Skip to content

Commit

Permalink
Update the README with submit and compiler/mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Apr 29, 2022
1 parent bd65ac9 commit 3a95262
Showing 1 changed file with 54 additions and 2 deletions.
56 changes: 54 additions & 2 deletions utils/matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,22 @@ Instructions
./conda/configure_compass_env.py --env_name compass_matrix \
--compiler all --mpi all --conda ~/miniconda3/
```
This will save some info in `conda/logs/matrix.log` that is needed for the
remainder of the build.
See the next section for more details. This will save some info in
`conda/logs/matrix.log` that is needed for the remainder of the build. If
you want to set up load scripts for more environments than you actually
want to run your matrix on, you can edit `matrix.log`. The syntax is:
```
<machine>
<compiler>, <mpi>
<compiler>, <mpi>
<compiler>, <mpi>
...
```
It is also safe to rerun `./conda/configure_compass_env.py` with just the
subset of compilers and MPI libraries you want for the matrix. Any
load scripts created in previous calls will not be deleted and the conda
environment will just be updated, not recreated unless you explicitly ask
for it to be recreated.

2. Copy `example.cfg` to the base of the branch:
```shell
Expand All @@ -41,6 +55,44 @@ Instructions
```shell
./utils/matrix/setup_matrix.py -f matrix.cfg
```
Optionally use the `--submit` flag to submit jobs once each configuration
has been built and set up.

8. The matrix build doesn't take care of running the jobs on a compute node.
You will need to do that yourself.

Matrix of compilers and MPI libraries
-------------------------------------

You control the matrix of compilers and MPI libraries by how you call
```shell
./conda/configure_compass_env.py ...
```
This is because the configure script knows about which compilers and MPI
libraries are available for a given machine, something tricky to figure out in
`./util/matrix/setup_matrix.py` directly.

You can do:
```shell
./conda/configure_compass_env.py --compiler all --mpi all ...
```
to get all supported compilers and MPI libraries. You can do:
```shell
./conda/configure_compass_env.py --compiler intel --mpi all ...
```
to get just the `intel` configurations. You can do:
```shell
./conda/configure_compass_env.py --compiler all --mpi openmpi ...
```
to get just the `openmpi` configurations or:
```shell
./conda/configure_compass_env.py --compiler intel ...
```
(omitting the `--mpi`) to get the default MPI library for intel. Finally, you
can give a list of compilers and a list of the same length of MPI libraries,
such as:
```shell
./conda/configure_compass_env.py --compiler intel intel intel gnu \
--mpi impi openmpi mvapich mvapich ...
```
This will give you 3 intel variants and a gnu variant.

0 comments on commit 3a95262

Please sign in to comment.