Skip to content

Commit

Permalink
migrate job template to use build_tools virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
lexming committed Jan 30, 2025
1 parent dd0faaf commit 8f4c78d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/build_tools/jobtemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,18 @@
#SBATCH --gpus-per-node=${gpus}
#SBATCH --partition=${partition}
test -n "$$PREFIX_EB" || { echo "ERROR: environment variable PREFIX_EB not set"; exit 1; }
# activate build_tools virtual environment
source "$$VSC_SCRATCH_VO_USER/EB4/eb4env/bin/activate"
# set environment
export BUILD_TOOLS_LOAD_DUMMY_MODULES=1
export LANG=${langcode}
export PATH=$$PREFIX_EB/easybuild-framework:$$PATH
export PYTHONPATH=$$PREFIX_EB/easybuild-easyconfigs:$$PREFIX_EB/easybuild-easyblocks:$$PREFIX_EB/easybuild-framework:$$PREFIX_EB/vsc-base/lib
SUBDIR_MODULES="modules"
SUBDIR_MODULES_BWRAP=".modules_bwrap"
SUFFIX_MODULES_PATH="collection"
SUFFIX_MODULES_SYMLINK="all"
# make build directory
if [ -z $$SLURM_JOB_ID ]; then
export TMPDIR=${tmp}/$$USER/
Expand Down
6 changes: 2 additions & 4 deletions tests/input/build_job_01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
#SBATCH --gpus-per-node=0
#SBATCH --partition=skylake_mpi

test -n "$PREFIX_EB" || { echo "ERROR: environment variable PREFIX_EB not set"; exit 1; }
# activate build_tools virtual environment
source "$VSC_SCRATCH_VO_USER/EB4/eb4env/bin/activate"

# set environment
export BUILD_TOOLS_LOAD_DUMMY_MODULES=1
export LANG=C
export PATH=$PREFIX_EB/easybuild-framework:$PATH
export PYTHONPATH=$PREFIX_EB/easybuild-easyconfigs:$PREFIX_EB/easybuild-easyblocks:$PREFIX_EB/easybuild-framework:$PREFIX_EB/vsc-base/lib

SUBDIR_MODULES="modules"
SUBDIR_MODULES_BWRAP=".modules_bwrap"
SUFFIX_MODULES_PATH="collection"
SUFFIX_MODULES_SYMLINK="all"


# make build directory
if [ -z $SLURM_JOB_ID ]; then
export TMPDIR=/tmp/eb-test-build/$USER/
Expand Down
6 changes: 2 additions & 4 deletions tests/input/build_job_02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
#SBATCH --gpus-per-node=1
#SBATCH --partition=ampere_gpu

test -n "$PREFIX_EB" || { echo "ERROR: environment variable PREFIX_EB not set"; exit 1; }
# activate build_tools virtual environment
source "$VSC_SCRATCH_VO_USER/EB4/eb4env/bin/activate"

# set environment
export BUILD_TOOLS_LOAD_DUMMY_MODULES=1
export LANG=C
export PATH=$PREFIX_EB/easybuild-framework:$PATH
export PYTHONPATH=$PREFIX_EB/easybuild-easyconfigs:$PREFIX_EB/easybuild-easyblocks:$PREFIX_EB/easybuild-framework:$PREFIX_EB/vsc-base/lib

SUBDIR_MODULES="modules"
SUBDIR_MODULES_BWRAP=".modules_bwrap"
SUFFIX_MODULES_PATH="collection"
SUFFIX_MODULES_SYMLINK="all"


# make build directory
if [ -z $SLURM_JOB_ID ]; then
export TMPDIR=/tmp/eb-test-build/$USER/
Expand Down

0 comments on commit 8f4c78d

Please sign in to comment.