Skip to content

Greifswald Cluster Installation

Alan-Goodman edited this page Apr 19, 2022 · 1 revision

IPP Greifswald Cluster installation instructions

Find below the simsopt and VMEC installation instructions from source on the IPP Greifswald cluster. These steps worked at of 17 November 2021.

Simsopt installation

  1. 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
  2. Set up a conda virtual environment with the name in which simsopt and its dependencies will be installed. This can be done by simply running

    conda create -n simsopt_venv python=3.9
  3. Load the appropriate modules

    ml openmpi mkl netcdf fftw

    and activate the conda environment:

    conda activate simsopt_venv
  4. Next, you will need to install mpi4py, which requires some special attention. In your terminal, run

    env CC=mpicc CXX=mpic++ MPICC=mpicc MPICXX=mpic++ pip install --user --no-cache-dir -v mpi4py
  5. At long last, we are ready to start installing simsopt. Clone the simsopt repository anywhere in your file system, and navigate to that directory:

    git clone https://github.com/hiddenSymmetries/simsopt.git
    cd simsopt
  6. Modify the setup.py file insisde the simsopt directory by adding the following lines

    import site
    site.ENABLE_USER_SITE = "--user" in sys.argv[1:]

    right underneath the line from setuptools.command.build_ext import build_ext.

  7. Still inside the simsopt directory, run

    CC=icc CXX=icpc pip install --user -e .[MPI,SPEC]

    This should install simsopt and all of its dependencies.

VMEC installation

  1. To install VMEC, first clone the repository and navigate to that directory by running:

    git clone https://github.com/hiddenSymmetries/VMEC2000
    cd VMEC2000
  2. Again modify the setup.py file by adding

    import site
    site.ENABLE_USER_SITE =--user" in sys.argv[1:]

    right underneath the line from glob import glob.

  3. 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"]
    }
  4. 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
  5. Finally, install VMEC with:

    pip install --user .