Skip to content
Snippets Groups Projects
Commit 86f9d7b6 authored by Michael Langguth's avatar Michael Langguth
Browse files

Remove wrapper from HPC-scripts directory.

parent 829d69ec
No related branches found
No related tags found
No related merge requests found
Pipeline #89940 failed
#!/usr/bin/env bash
# basic directory variables
ENV_SETUP_DIR=`pwd`
WORKING_DIR="$(dirname "$ENV_SETUP_DIR")"
EXE_DIR="$(basename "$ENV_SETUP_DIR")"
VENV_DIR=$WORKING_DIR/$1/$1
shift # replaces $1 by $2, so that $@ does not include the name of the virtual environment anymore
# sanity checks
if [[ "${EXE_DIR}" != "HPC_scripts" ]]; then
echo "ERROR: Run the setup-script for the environment from the HPC_scripts-directory!"
exit
fi
if ! [[ -d "${VENV_DIR}" ]]; then
echo "ERROR: Could not found virtual environment under ${VENV_DIR}!"
exit
fi
#expand PYHTONPATH
# Include site-packages from virtual environment...
unset PYTHONPATH
export PYTHONPATH=${VENV_DIR}/lib/python3.8/site-packages/:$PYTHONPATH
# ... dist-packages from container singularity...
export PYTHONPATH=/usr/local/lib/python3.8/dist-packages:$PYTHONPATH
# ... and modules from current
export PYTHONPATH=${WORKING_DIR}:$PYTHONPATH
export PYTHONPATH=${WORKING_DIR}/utils:$PYTHONPATH
# Control
echo "****** Check PYTHONPATH *****"
echo $PYTHONPATH
# MPI realted environmental variables
export PMIX_SECURITY_MODE="native"
export TF_XLA_FLAGS=--tf_xla_auto_jit=0 # disable XLA graph optimization
$@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment