-
Notifications
You must be signed in to change notification settings - Fork 27
Add Polaris guide #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Polaris guide #930
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2f133c8
Add Polaris guide
shuds13 7dea571
Add forces_gpu Polaris submission script
shuds13 87b5796
Add simple pbs submit script to examples
shuds13 097765d
Update Polaris guide
shuds13 be8cf1d
Update forces_gpu tutorial
shuds13 c163006
More forces gpu tutorial updates
shuds13 cdc22c6
Fix typos and grammer
shuds13 2c95ba5
Remove old text
shuds13 19b2a79
Small edits
jmlarson1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| ======= | ||
| Polaris | ||
| ======= | ||
|
|
||
| Polaris_ is a 560-node HPE system located in the ALCF_ at Argonne | ||
| National Laboratory. The compute nodes are equipped with a single AMD EPYC Milan | ||
| processor and four A100 NVIDIA GPUs. It uses the PBS scheduler to submit | ||
| jobs from login nodes to run on the compute nodes. | ||
|
|
||
|
|
||
| Configuring Python and Installation | ||
| ----------------------------------- | ||
|
|
||
| Python and libEnsemble are available on Polaris with the `conda` module. Load the | ||
| ``conda`` module and activate the base environment:: | ||
|
|
||
| module load conda | ||
| conda activate base | ||
|
|
||
| This also gives you access to machine-optimized packages such as mpi4py_. | ||
|
|
||
| To install further packages, including updating libEnsemble, you may either create | ||
| a virtual environment on top of this (if just using ``pip install``) or clone the base | ||
| environment (if you need ``conda install``). More details at `Python for Polaris`_. | ||
|
|
||
| .. container:: toggle | ||
|
|
||
| .. container:: header | ||
|
|
||
| Example of Conda + virtual environment | ||
|
|
||
| E.g.,~ to create a virtual environment that allows installation of further packages:: | ||
|
|
||
| python -m venv /path/to-venv --system-site-packages | ||
| . /path/to-venv/bin/activate | ||
|
|
||
| Where ``/path/to-venv`` can be anywhere you have write access. For future sessions, | ||
| just load the ``conda`` module and run the activate line. | ||
|
|
||
| You can now pip install libEnsemble:: | ||
|
|
||
| pip install libensemble | ||
|
|
||
| See :doc:`here<../advanced_installation>` for more information on advanced options | ||
| for installing libEnsemble, including using Spack. | ||
|
|
||
|
|
||
| Ensuring use of mpiexec | ||
| ----------------------- | ||
|
|
||
| If using the :doc:`MPIExecutor<../executor/mpi_executor>` it is recommended to | ||
| ensure you are using ``mpiexec`` instead of ``aprun``. When setting up the executor use:: | ||
|
|
||
| from libensemble.executors.mpi_executor import MPIExecutor | ||
| exctr = MPIExecutor(custom_info={'mpi_runner':'mpich', 'runner_name':'mpiexec'}) | ||
|
|
||
|
|
||
| Job Submission | ||
| -------------- | ||
|
|
||
| Polaris uses the PBS scheduler to submit jobs from login nodes to run on | ||
| the compute nodes. libEnsemble runs on the compute nodes using either | ||
| ``multi-processing`` or ``mpi4py`` | ||
|
|
||
| A simple example batch script for a libEnsemble use case that runs 5 workers | ||
| (e.g.,~ one persistent generator and four for simulations) on one node: | ||
|
|
||
| .. code-block:: bash | ||
| :linenos: | ||
|
|
||
| #!/bin/bash | ||
| #PBS -A <myproject> | ||
| #PBS -lwalltime=00:15:00 | ||
| #PBS -lselect=1 | ||
| #PBS -q debug | ||
| #PBS -lsystem=polaris | ||
| #PBS -lfilesystems=home:grand | ||
|
|
||
| export MPICH_GPU_SUPPORT_ENABLED=1 | ||
|
|
||
| cd $PBS_O_WORKDIR | ||
|
|
||
| python run_libe_forces.py --comms local --nworkers 5 | ||
|
|
||
| The script can be run with:: | ||
|
|
||
| qsub submit_libe.sh | ||
|
|
||
| Or you can run an interactive session with:: | ||
|
|
||
| qsub -A <myproject> -l select=1 -l walltime=15:00 -lfilesystems=home:grand -qdebug -I | ||
|
|
||
| You may need to reload your ``conda`` module and reactivate ``venv`` environment | ||
| again after starting the interactive session. | ||
|
|
||
| Demonstration | ||
| ------------- | ||
|
|
||
| For an example that runs a small ensemble using a C application (offloading work to the | ||
| GPU), see the :doc:`forces_gpu<../tutorials/forces_gpu_tutorial>` tutorial. A video demonstration_ | ||
| of this example is also available. | ||
|
|
||
|
|
||
| .. _Polaris: https://www.alcf.anl.gov/polaris | ||
| .. _ALCF: https://www.alcf.anl.gov/ | ||
| .. _Python for Polaris: https://www.alcf.anl.gov/support/user-guides/polaris/data-science-workflows/python/index.html | ||
| .. _conda: https://conda.io/en/latest/ | ||
| .. _mpi4py: https://mpi4py.readthedocs.io/en/stable/ | ||
| .. _demonstration: https://youtu.be/Ff0dYYLQzoU | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash -l | ||
| #PBS -l select=2 | ||
| #PBS -l walltime=00:15:00 | ||
| #PBS -q <queue_name> | ||
| #PBS -A <myproject> | ||
|
|
||
| # We selected 2 nodes - now running with 8 workers. | ||
| export MPICH_GPU_SUPPORT_ENABLED=1 | ||
| cd $PBS_O_WORKDIR | ||
| python run_libe_forces.py --comms local --nworkers 8 |
10 changes: 10 additions & 0 deletions
10
libensemble/tests/scaling_tests/forces/submission_scripts/submit_pbs_simple.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash -l | ||
| #PBS -l select=1:system=polaris | ||
| #PBS -l walltime=00:15:00 | ||
| #PBS -l filesystems=home:grand | ||
| #PBS -q debug | ||
| #PBS -A <myproject> | ||
|
|
||
| export MPICH_GPU_SUPPORT_ENABLED=1 | ||
| cd $PBS_O_WORKDIR | ||
| python run_libe_forces.py --comms local --nworkers 4 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the first "
conda" supposed to be "conda_"?