module load openmpi/2.1.2
module show openmpi/2.1.2
Spack Package Management
Anaconda Package Management
If most of your software requirements revolve around scientific python packages you may want to install Conda into your home or group directory. Conda is an open source package and environment management system.
Example 1, Miniconda Installed into your home directory.
Run the following to install a Miniconda. Note that we recommend example 2 below as group directories provide much more storage space than the 50GB home directories on the cluster.
Python3 MiniConda installation
(base) [jflilley@login1]$ which python
As sourcing of the Conda environment is in your ~/.bashrc all compute nodes will have the proper paths set to use Conda packages. If you've setup multiple conda environments be sure that your slurm submission scripts activate the correct environment if not the default one.
Example 3, Conda Install into your groups shared directory. Complete Example 1 installation above first. Add the secondary conda environment by creating a new .condarc file in your home directory, replacing <group name directory> with your groups directory name.
- /central/groups/<group name directory>/anaconda2
Verify the environment shows up and then activate.
[jflilley@login1 ~]$ conda env list
second-shared-environment /central/groups/MICS/anaconda2/second-shared-environment base * /home/jflilley/anaconda2
conda activate second-shared-environment
/central/groups/<group name directory>/second-shared-environment/bin/python
Another method to share Conda environments while allowing flexibility for other users to self manage their own, is to export an environment to yaml that can be imported into the other users personal Conda setup.
To export an environment to share with another researcher, first activate the intended environment in Conda and run the following command.
conda env export > ~/shared-conda-environment.yml
To import the Conda environment into another Conda installation run.
conda env create -f shared-conda-environment.yml
To verify the import you may list your Conda environments.
conda env list
Using Python's native Virtual Environment function (venv)
Another option is to use our Python environment module on the cluster along with python's native virtual environment function. (venv) The only downside to this method is that the python version may not be quite as new as the one available via conda.
module load python3/3.8.5
python3 -m venv /central/groups/imss_admin/jflilley/python-environments/my-test-venv
(venv3) [jflilley@login1 ~]$ which python
Now install whatever packages are needed via Pip etc.