-
Notifications
You must be signed in to change notification settings - Fork 49
Viper installation instructions
Viper is the newest MPCDF HPC system, replacing Cobra as of July 2024. See https://docs.mpcdf.mpg.de/doc/computing/viper-user-guide.html for details.
These installation instructions work as of 2024-07-12.
It is assumed that the steps are performed in the same order as below.
Load the following modules
module load intel/2024.0 impi/2021.11 anaconda/3/2023.03 mkl/2024.0 netcdf-mpi/4.9.2 mpi4py/3.1.4 fftw-mpi/3.3.10 boost-mpi/1.83 hdf5-mpi/1.14.1
and set the LD_LIBRARY_PATH
to reflect the location of the newly loaded libraries.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MKL_HOME}/lib/intel64:${HDF5_HOME}/lib:${NETCDF_HOME}/lib
You will want to add both these lines to .bashrc
or a similar script.
Setup a virtual environment in ~/.simsopt_venv
mkdir ~/.simsopt_venv
python -m venv --system-site-packages ~/.simsopt_venv/
source ~/.simsopt_venv/bin/activate
export PYTHONPATH=${PYTHONPATH}:~/.simsopt_venv/lib/python3.10/site-packages
python -m pip install --upgrade pip
You will want to add source ~/.simsopt_venv/bin/activate
and export PYTHONPATH=${PYTHONPATH}:~/.simsopt_venv/lib/python3.10/site-packages
to .bashrc
or a similar script.
git clone https://github.com/hiddenSymmetries/simsopt.git
cd simsopt
python -m pip install -r requirements.txt
python -m pip install -e .[MPI]
git clone https://github.com/hiddenSymmetries/VMEC2000
cd VMEC2000
python -m pip install f90wrap scikit-build
We need to edit/replace the default cmake_config_file.json.
Create a json file cmake_config_file.json
with the following content
{
"cmake_args": [
"-DCMAKE_C_COMPILER=mpiicc",
"-DCMAKE_CXX_COMPILER=mpiicc",
"-DCMAKE_Fortran_COMPILER=mpiifort",
"-DNETCDF_INC_PATH=${NETCDF_HOME}/include",
"-DNETCDF_LIB_PATH=${NETCDF_HOME}/lib",
"-DBLA_VNEDOR=Intel10_64lp",
"-DSCALAPACK_LIB_DIR=${MKL_HOME}/lib/intel64",
"-DSCALAPACK_LIB_NAME=mkl_scalapack_lp64",
"-DBLACS_LIB_DIR=${MKL_HOME}/lib/intel64",
"-DBLACS_LIB_NAME=mkl_blacs_intelmpi_lp64"
]
}
and then run
sed -i 's#\${NETCDF_HOME}#'${NETCDF_HOME}'#g' cmake_config_file.json
sed -i 's#\${MKL_HOME}#'${MKL_HOME}'#g' cmake_config_file.json
sed -i 's#mpiicc#mpiicx#g' cmake_config_file.json
to replace the environment variables with their values.
Finally, install VMEC by running
python setup.py build_ext
python setup.py install
Installing booz_xform via pip does not work on Viper (as of 2024-07-12).
If the previous steps were performed, all dependencies needed to compile booz_xform should have been installed. Simply run
git clone https://github.com/hiddenSymmetries/booz_xform.git
cd booz_xform
python -m pip install -v -e .