Selector-mpi (flory)
The script selector-mpi, located in the /home/bgo/shared/bin directory, makes it easy to setup the environment for supported MPI implementations and packages.
Usage
A typical command line would look like this:
source /home/bgo/shared/bin/selector-mpi --quiet -f -i gnu-openmpi lammps/20170101 qe/5.0.2
Below is a table of all options available from the command line. The long form options are preceded with --
, and short form a single -
. For options with both a long and short form, either one may be used on the command line.
Command Line Options
Long form1 | Short form2 | Option type | Required? | Description |
---|---|---|---|---|
implementation |
i |
string | No | Set MPI implementation |
o |
No | Shortcut for -i gnu-openmpi
| ||
show |
s |
No | Shows available MPI implementations or package versions for implementation. To see package versions, -i or -o must specified first, otherwise MPI implementations will be shown.
| |
fullclean |
f |
No | Full (almost) clean of path. Cleans out extraneous path entries that the typical user does not need (e.g., sbin directories). | |
clean |
c |
No | Cleans all paths by removing entries that this script adds, also does a -f for a full cleanup. NOTE: If this is specified, the script will clean the path and ignore all other options, except for verbose and quiet.
| |
verbose |
v |
No | Be verbose | |
quiet |
q |
No | Be quiet. | |
help |
h |
No | Show the help text. |
A list of packages and their versions to use can be added to the end of the command line, the default version will be used for any unspecified package. In the example above, lammps/20161117 and qe/5.0.2 package/versions are selected. See examples below for details.
Examples
Show Available MPI Implementations
To get a list of available MPI implementations:
user $
source /home/bgo/shared/bin/selector-mpi -s
gnu-openmpi: GNU compiler and OpenMPI icc-openmpi: Intel compiler and OpenMPI (Not currently available)
Show Available Package Versions
To get a list of package versions available for the gnu-openmpi MPI implementation:
user $
source /home/bgo/shared/bin/selector-mpi -i gnu-openmpi -s
Implementation: gnu-openmpi lammps: * lammps/20161117 qe: * qe/5.0.2 qe/6.0 *: Default version.
Use Default Package Version
To use the default package version for the gnu-openmpi MPI implementation:
user $
source /home/bgo/shared/bin/selector-mpi -i gnu-openmpi
Implementation: gnu-openmpi Package: lammps/default (20161117) Package: qe/default (5.0.2)
Use Specific Package Versions
To use LAMMPS version 20161117, Quantum ESPRESSO version 5.0.2, and the default version for all other available packages for the gnu-openmpi MPI implementation:
user $
source /home/bgo/shared/bin/selector-mpi -i gnu-openmpi lammps/20161117 qe/5.0.2
Implementation: gnu-openmpi Package: lammps/20161117 Package: qe/5.0.2
See Details
To see in more detail what selector-mpi is doing, the verbose flag can be added to any command line. The previous command, with verbosity turned on, gives:
user $
source /home/bgo/shared/bin/selector-mpi --verbose -i gnu-openmpi lammps/20161117 qe/5.0.2
Implementation: gnu-openmpi Cleaning paths. Removing previous implementation paths. Updated PATH Updated MANPATH Updated LD_LIBRARY_PATH Updating environmental variables for base implementation. Adding to PATH: /home/bgo/shared/bin Updating environmental variables for gnu-openmpi implementation. Adding to PATH: /home/bgo/shared/gnu-openmpi/bin Adding to LD_LIBRARY_PATH: /home/bgo/shared/gnu-openmpi/lib Adding to LD_LIBRARY_PATH: /home/bgo/shared/gnu-openmpi/usr/lib Adding to MANPATH: /home/bgo/shared/gnu-openmpi/share/man Package: lammps/default (20161117) Adding to PATH: /home/bgo/shared/gnu-openmpi/versioned/lammps/default/bin Package: qe/default (5.0.2) Adding to PATH: /home/bgo/shared/gnu-openmpi/versioned/qe/default/bin
Automatically Select Packages on Login
To automatically select Open MPI compiled with the GNU compiler and the default version of all packages for every login, add the following line to the bottom of the $HOME/.bashrc file:
source /home/bgo/shared/bin/selector-mpi -i gnu-openmpi -f -q
See Make Changes Persistent and Global on the Initial Setup page for details.
It is recommended to put a line similar to this into all queue submission scripts to be sure which MPI implementation and package version is used.