Skip to content

Commit

Permalink
tiny edits based on suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Oct 2, 2023
1 parent 7bd12ae commit bdacdb9
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions docs/polaris/workflows/libensemble.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# libEnsemble

libEnsemble is a Python toolkit for running dynamic ensembles of calculations. Users provide generator and simulator functions to express their ensembles, where the generator can steer the ensemble based on previous results. A library of example functions is available which can be modified as needed. These functions can submit external executables at any scale and in a portable way. System details are detected, and dynamic resource management is provided. libEnsemble can be used in a consistent manner on laptops, clusters, and supercomputers with minimal required dependencies.
libEnsemble is a Python toolkit for running dynamic ensembles of calculations.

Users provide generator and simulator functions to express their ensembles, where the generator can steer the ensemble based on previous results. These functions can submit external executables at any scale and in a portable way.

System details are detected, and dynamic resource management is provided. This includes automatically detecting, assigning, and reassigning
GPUs for ensemble members.

libEnsemble can be used in a consistent manner on laptops, clusters, and supercomputers with minimal required dependencies.

## Getting libEnsemble on Polaris

Expand Down Expand Up @@ -38,17 +45,20 @@ See the docs for more details on using [python on Polaris](https://docs.alcf.anl
For a very simple example of using libEnsemble see the [Simple Introduction tutorial](https://libensemble.readthedocs.io/en/main/tutorials/local_sine_tutorial.html)

For an example that runs a small ensemble using a C application (offloading work to the GPU), see
[the GPU app tutorial](https://libensemble.readthedocs.io/en/main/tutorials/forces_gpu_tutorial.html). The required files for the this tutorial can be found in [this directory](https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/scaling_tests/forces).
[the GPU app tutorial](https://libensemble.readthedocs.io/en/main/tutorials/forces_gpu_tutorial.html).
The required files for this tutorial can be found
in [this directory](https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/scaling_tests/forces).
A [video demo](https://youtu.be/Ff0dYYLQzoU) is also available.

## Job Submission

libEnsemble runs on the compute nodes on Polaris using either Python's
``multiprocessing`` module or ``mpi4py``. The user can set the number of workers for
``multiprocessing`` or ``mpi4py``. The user can set the number of workers for
maximum concurrency. libEnsemble will detect the nodes available
from the PBS environment and use these for running simulations. Polaris supports
running multiple concurrent simulations on each node if desired.

A simple example batch script for a libEnsemble use case that runs four workers on one node:
A simple example batch script for a libEnsemble use case that runs five workers on one node:

```shell
#!/bin/bash -l
Expand All @@ -60,7 +70,7 @@ A simple example batch script for a libEnsemble use case that runs four workers

export MPICH_GPU_SUPPORT_ENABLED=1
cd $PBS_O_WORKDIR
python run_libe_forces.py --comms local --nworkers 4
python run_libe_forces.py --comms local --nworkers 5
```

The script can be run with:
Expand Down

0 comments on commit bdacdb9

Please sign in to comment.