Skip to content
Snippets Groups Projects
Commit b52f78c1 authored by Simon May's avatar Simon May
Browse files

Only load modules once per session in .bashrc

parent 65c76051
No related branches found
No related tags found
No related merge requests found
...@@ -2,15 +2,19 @@ ...@@ -2,15 +2,19 @@
# in /etc/profile, i.e. *before* ~/.profile! # in /etc/profile, i.e. *before* ~/.profile!
. ~/.env . ~/.env
# setup modules # 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 # hierarchical module system: compiler → mpi → libraries
# Modules fftw-mpi and hdf5-mpi become available after loading a compiler module # 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 # 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 # compiler/MPI combination that was loaded (i.e. in this case, fftw-mpi is the
# version compiled with intel and impi). # version compiled with intel and impi).
# Currently, loading both compiler modules (gcc and intel) causes problems with the # Currently, loading both compiler modules (gcc and intel) causes problems with
# MODULEPATH that is set up by impi, so make sure to load another compiler only # the MODULEPATH that is set up by impi, so make sure to load another compiler
# *after* impi is loaded! # only *after* impi is loaded!
module load intel module load intel
module load impi module load impi
module load fftw-mpi module load fftw-mpi
...@@ -27,6 +31,7 @@ module load anaconda ...@@ -27,6 +31,7 @@ module load anaconda
module load julia module load julia
module load gnuplot module load gnuplot
module load p7zip module load p7zip
fi
# if running interactively: set MPI variables; else stop # if running interactively: set MPI variables; else stop
# see https://www.mpcdf.mpg.de/services/computing/linux/Astrophysics # see https://www.mpcdf.mpg.de/services/computing/linux/Astrophysics
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment