soledge3x

Version 0.9.0

Edge plasma code

Installation

Download source code

First things first: you need the SOLEDGE3X code: Get it from gitlab.

git clone git@drf-gitlab.cea.fr:s3xe/soledge3x.git

Switch to the last tagged version:

cd soledge3x
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b ${tag}_master
cd ..

For simulations with EIRENE (kinetic neutral model): additional styx interface is needed

  • Same procedure:
git clone git@drf-gitlab.cea.fr:s3xe/styx.git
cd styx
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b ${tag}_master
cd ..

Compilation environment

Prerequisite

You need a compiler for Fortran 90:

  • e.g. GNU gfortran or Intel ifort

SOLEDGE3X relies on several libraries that must be available for compilation

  • Necessary libaries
NameFeature
OpenMPShared memory parallelism
MPIDistributed memory parallelism
LAPACKEfficient routines for linear algebra
HDF5 > 1.10Output file format
JSON-fortranInput file format
  • Numerical solvers (at least one)
NameFeaure
PETScLarge collection of solvers - MPI+GPU support
PASTIXDirect solvers for large sparse matrices - MPI+OpenMP+GPU support
HYPREScalable iterative solver - MPI+OpenMP+GPU support
  • Optional libraries
NameFeature
GKSNeeded for EIRENE (provided with styx)
GRSOFTNeeded for EIRENE (provided with styx)
IMASStandard IO format for fusion community
PFUnitUnit tests

Get the Libraries

  • Many clusters provide standard libraries, use them, e.g. (on IRENE supercomputer):
module purge
module load flavor/buildcompiler/intel
module load flavor/buildmpi/intelmpi
module load mpi/intelmpi
module load feature/system/thp_always
module load flavor/hdf5/parallel
module load hdf5
module load petsc/3.15.0
  • If a library is not available, you need to install it by yourself, with the same compiler as intended to use later ! ..* Most are available online ..* Except: GKS and GRSOFT (needed for EIRENE) provided in styx/EIRENE/external_libs

  • The environment is already set up on some standard clusters ..* ADASTRA, IRENE, ROME, JEANZAY from the French HPC network ..* PERSEE on local clusters, ITER for Iter clusters, newCCAMU for Aix-Marseille university mesocentre ..* LEONARDO_CPU and LEONARDO_GPU for the CINECA EUROfusion cluster in Italy ..* LUMI European HPC cluster in Finland On them, installation paths and suggested modules can be found in the file: soledge3x/compilation/makefile_resources/MakeRaptorX_<cluster>.inc

Generate the compilation environment

  • Suppose you folder are structured as follows:
S3XE/
- build # compilation folder
- libs # custom libraries
- soledge3x # S3X source code
- styx # STYX source code
  • From within build/, execute (in one line):
cmake ../soledge3x -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../soledge3x/compilation/cmake_resources/<COMPILER>.toolchain.cmake

It will probably fail. You need now to specify the paths of manually installed libraries

  • Execute ccmake . to edit cmake options:
CHIP native
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_TOOLCHAIN_FILE /ccc/work/cont003/gen1
COMPILER_REPORTS OFF
ENABLE_UTESTS OFF
HDF5_Fortran_LIBRARY_dl /usr/lib64/libdl.so
HDF5_Fortran_LIBRARY_hdf5 /ccc/products/hdf5-1.12.0/intel--20.0
HDF5_Fortran_LIBRARY_hdf5_fort /ccc/products/hdf5-1.12.0/intel-20.0
HDF5_Fortran_LIBRARY_m /usr/lib64/libm.so
HDF5_Fortran_LIBRARY_pthread /usr/lib64/libpthread.so
HDF5_Fortran_LIBRARY_z /usr/lib64/libz.so
JsonFortran_INCLUDE_DIR JsonFortran_INCLUDE_DIR-NOTFOUND
JsonFortran_LIBRARY JsonFortran_LIBRARY-NOTFOUND
PRECISION double
PRODUCTION_RUN OFF
S3X_USE_AGMG OFF
S3X_USE_MUMPS OFF
S3X_USE_PASTIX OFF
S3X_USE_PETSC ON
USE_EIRENE OFF
USE_GPU NONE
  • Find the line with an error (in the example above, there is a problem with JSON libraries which are not found)
  • Provide the paths to manual installation of the missing library. Typically:
libs/<libname>/include
libs/<libname>/lib/lib<-->.a

or use the paths indicated in MakeRaptorX_<cluster>.inc

  • Configure (press ‘C’)
  • Re-run cmake .
  • Repeat the process until success

Further compilation options

Compilation options
Extra compilation options

Compile the code

  • If you are happy with your CMake configuration, start compiling the code
cmake --build . --parallel --target all

It generates the execution files:

  • soledge3x after a simple S3X compilation
  • soledge3x-eirene after a compilation with EIRENE

Ready to be used in to start simulations

Last updated on 1 Apr 2025
Published on 1 Apr 2025