#!/bin/bash

module purge

module load intel intelmpi wrf wrfchem-tools nco proj geos gdal

INTEL=/alcc/gpfs2/sw/intel/19
. $INTEL/bin/compilervars.sh intel64

#
# setup communication between Intel MPI and SLURM
# process management interface. Do not set this
# variable in an MPD or Hydra environment.
#

#export I_MPI_PMI_LIBRARY=/usr/lib/x86_64-linux-gnu/libpmi.so.0.0.0
#
# setup MPI communication ALCC internal network for Intel 2019 and higher
#
export I_MPI_FABRICS=shm:ofi
export I_MPI_SHM_OPT=shm
export I_MPI_TUNING_NETWORK=192.168.2.0/24
export FI_PROVIDER=tcp
#export FI_TCP_IFACE=eth5
#export FI_PROVIDER=sockets  # in case of problems with tcp provider
#export FI_SOCKETS_IFACE=eth5
# uncomment to get debug info
#export I_MPI_DEBUG=5
#export FI_LOG_LEVEL=debug

ulimit -s unlimited
