-
Notifications
You must be signed in to change notification settings - Fork 49
Greifswald Cluster Installation
Find below the simsopt
and VMEC
installation instructions from source on the IPP Greifswald cluster. These steps worked at of 17 November 2021.
-
Add the following two lines in your ~/.bashrc file:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HDF5_HOME}/lib:${NETCDF_HOME}/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MKL_HOME}/lib/intel64
-
Set up a
conda
virtual environment with the name in whichsimsopt
and its dependencies will be installed. This can be done by simply runningconda create -n simsopt_venv python=3.9
-
Load the appropriate modules
ml openmpi mkl netcdf fftw
and activate the conda environment:
conda activate simsopt_venv
-
Next, you will need to install
mpi4py
, which requires some special attention. In your terminal, runenv CC=mpicc CXX=mpic++ MPICC=mpicc MPICXX=mpic++ pip install --user --no-cache-dir -v mpi4py
-
At long last, we are ready to start installing
simsopt
. Clone thesimsopt
repository anywhere in your file system, and navigate to that directory:git clone https://github.com/hiddenSymmetries/simsopt.git cd simsopt
-
Modify the
setup.py
file insisde thesimsopt
directory by adding the following linesimport site site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
right underneath the line
from setuptools.command.build_ext import build_ext
. -
Still inside the
simsopt
directory, runCC=icc CXX=icpc pip install --user -e .[MPI,SPEC]
This should install
simsopt
and all of its dependencies.
-
To install
VMEC
, first clone the repository and navigate to that directory by running:git clone https://github.com/hiddenSymmetries/VMEC2000 cd VMEC2000
-
Again modify the
setup.py
file by addingimport site site.ENABLE_USER_SITE = “--user" in sys.argv[1:]
right underneath the line
from glob import glob
. -
Next, replace all text in the
cmake_config_file.json
in the VMEC2000 folder with:{ "cmake_args": [ "-DCMAKE_C_COMPILER=/opt/hgw/mpi/openmpi/4.1.1/intel_19_1_3-avx--ib/bin/mpicc", "-DCMAKE_CXX_COMPILER=/opt/hgw/mpi/openmpi/4.1.1/intel_19_1_3-avx--ib/bin/mpic++", "-DCMAKE_Fortran_COMPILER=/opt/hgw/mpi/openmpi/4.1.1/intel_19_1_3-avx--ib/bin/mpif90", "-DNETCDF_INC_PATH=/opt/hgw/tools/netcdf/4.7.4/intel_19_1_3-avx--openmpi_4_1_1-ib--hdf5_1_10_6/include", "-DNETCDF_LIB_PATH=/opt/hgw/tools/netcdf/4.7.4/intel_19_1_3-avx--openmpi_4_1_1-ib--hdf5_1_10_6/lib", "-DSCALAPACK_LIB_DIR=/opt/hgw/compilers/intel/ics2020.4/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64", "-DSCALAPACK_LIB_NAME=mkl_scalapack_lp64", "-DBLACS_LIB_DIR=/opt/hgw/compilers/intel/ics2020.4/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64", "-DBLACS_LIB_NAME=mkl_blacs_intelmpi_lp64"] }
-
Most of the modules you'll need should already be loaded from the simsopt installation, but just to be safe, run
ml intel openmpi mkl fftw netcdf cmake/3.18
-
Finally, install
VMEC
with:pip install --user .