Installing IPS on NERSC¶
NERSC recommends the use of anaconda environments to manage python installs, see Brief introduction to Python at NERSC.
There is a conda environment already constructed and maintained for the atom project created using the shareable environment method. You can activate it and run IPS by:
module load python
source activate /global/common/software/atom/cori/ips-framework-new
ips.py --config=simulation.config --platform=platform.conf
Creating you own conda environment¶
This guide will go through creating a conda environment on NERSC and installing the IPS Framework using Option 2: Module + source activate
First, you need to load the python module, then create and activate a
new conda environment. This will create the conda environment in your
home directory ($HOME/.conda/envs
):
module load python
conda create --name my_ips_env python=3.8 # or any version of python >=3.6
source activate my_ips_env
If you would like the same packages and versions in your conda
environment as found in the python modules on Cori, you can clone that
environment. In this case using python/3.7-anaconda-2019.10
.
module load python/3.7-anaconda-2019.10
conda create -n my_ips_env --clone base
source activate my_ips_env
Next, install IPS-Framework into the conda environment
python -m pip install ipsframework
To leave your environment
conda deactivate
The example below shows how to select the newly create conda environment in a batch script, see Running Python in a batch job
#!/bin/bash
#SBATCH --constraint=haswell
#SBATCH --nodes=1
#SBATCH --time=5
module load python
source activate my_ips_env
ips.py --config=simulation.config --platform=platform.conf