Navigation and service

Usage of sundials on JUWELS

sundials version 5.1.0 is available on JUWELS for Intel compiler with ParaStationMPI, IntelMPI, and with OpenMPI and for GCC with ParaStationMPI and OpenMPI

sundials version 5.2.0 is available on JUWELS in Stages/Devel-2019a. To get that you first have to say:

module use $OTHERSTAGES
module load Stages/Devel-2019a

Compilation and linking of a C user-program calling sundials routines version 5.1.0 is done by

module load intel-para [Intel IntelMPI] [Intel OpenMPI] [GCC ParaStationMPI] [GCC OpenMPI]
module load sundials/5.1.0
mpicc -c -I$SUNDIALS_ROOT/include main.c
mpicc main.o -L/$SUNDIALS_ROOT/lib -lsundials_arkode -lsundials_cvode \
-lsundials_cvodes -lsundials_kinsol -lsundials_ida \
-lsundials_nvecparallel -lm

You only need the libraries of the part of sundials you are using.

Compilation and linking of a Fortran user-program calling sundials routines version 5.1.0 is done by

module load intel-para [Intel IntelMPI] [Intel OpenMPI] [GCC ParaStationMPI] [GCC OpenMPI]
module load sundials/5.1.0
mpif90 main.f -I$SUNDIALS_ROOT/include -L$SUNDIALS_ROOT/lib \
-lsundials_fcvode -lsundials_cvode \
-lsundials_farkode -lsundials_arkode \
-lsundials_fcvodes -lsundials_cvodes \
-lsundials_fkinsol -lsundials_kinsol -lsundials_fida \
-lsundials_ida -lsundials_fnvecparallel \
-lsundials_nvecparallel -lm

You only need the libraries of the part of sundials you are using, but in the Fortran and C version.


Examples
Some examples can be found in the directories
$SUNDIALS_ROOT/examples .
You can copy an example and the corresponding Makefile to your working directory and type make to compile and link an example.