From 2a8db7128d9ca869b4c3c9bd61659d7d30395265 Mon Sep 17 00:00:00 2001 From: Simon May Date: Sat, 28 Mar 2020 20:26:30 +0100 Subject: [PATCH] Create separate scripts for compiler/MPI module combinations --- .bashrc | 36 ++++-------------------------------- modules/common.sh | 11 +++++++++++ modules/gcc.sh | 5 +++++ modules/intel.sh | 5 +++++ 4 files changed, 25 insertions(+), 32 deletions(-) create mode 100755 modules/common.sh create mode 100755 modules/gcc.sh create mode 100755 modules/intel.sh diff --git a/.bashrc b/.bashrc index 8da1e83..c95798a 100644 --- a/.bashrc +++ b/.bashrc @@ -2,38 +2,10 @@ # in /etc/profile, i.e. *before* ~/.profile! . ~/.env -# setup modules; only execute once to prevent re-loading impi after loading gcc -if [ -z "$_MODULES_LOADED" ]; then - # set variable to mark modules as loaded - _MODULES_LOADED=1 - export _MODULES_LOADED - # hierarchical module system: compiler → mpi → libraries - # Modules fftw-mpi and hdf5-mpi become available after loading a compiler module - # and an MPI library (impi). The available modules are determined by the - # compiler/MPI combination that was loaded (i.e. in this case, fftw-mpi is the - # version compiled with intel and impi). - # Currently, loading both compiler modules (gcc and intel) causes problems with - # the MODULEPATH that is set up by impi, so make sure to load another compiler - # only *after* impi is loaded! - module load intel - module load impi - module load fftw-serial - module load hdf5-serial - module load gsl - module load pkg-config - module load clang - module load datashare - module load git - #module load mathematica # only available on login nodes - #module load idl # only available on login nodes - module load anaconda - module load mpi4py - module load julia - module load gnuplot - module load p7zip - # load gcc *after* any module affected by the hierarchical intel/impi module tree! - module load gcc -fi +# setup modules +. ~/modules/gcc.sh +#module load mathematica # only available on login nodes +#module load idl # only available on login nodes # if running interactively: set MPI variables; else stop # see https://www.mpcdf.mpg.de/services/computing/linux/Astrophysics diff --git a/modules/common.sh b/modules/common.sh new file mode 100755 index 0000000..ecea9c1 --- /dev/null +++ b/modules/common.sh @@ -0,0 +1,11 @@ +module load fftw-serial +module load hdf5-serial +module load gsl +module load pkg-config +module load clang +module load datashare +module load git +module load anaconda +module load julia +module load gnuplot +module load p7zip diff --git a/modules/gcc.sh b/modules/gcc.sh new file mode 100755 index 0000000..067f6b3 --- /dev/null +++ b/modules/gcc.sh @@ -0,0 +1,5 @@ +module purge +module load gcc +module load openmpi +. ~/modules/common.sh +#module load mpi4py # only available with impi? diff --git a/modules/intel.sh b/modules/intel.sh new file mode 100755 index 0000000..c4d3c3f --- /dev/null +++ b/modules/intel.sh @@ -0,0 +1,5 @@ +module purge +module load intel +module load impi +. ~/modules/common.sh +module load mpi4py -- GitLab