job.qsub 580 Bytes
Newer Older
Matthieu Dorier's avatar
Matthieu Dorier committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/bin/bash
#COBALT -A MY_PROJECT
#COBALT -n 4
#COBALT -t 0:30:00
#COBALT --mode script
#COBALT -q debug-flat-quad

set -eu

export MPICH_GNI_NDREG_ENTRIES=1024
export HDF5_USE_FILE_LOCKING=FALSE

PDOMAIN=mypdomain

echo "Setting up spack"
source $HOME/spack/share/spack/setup-env.sh
echo "Activating env"
spack env activate myenv

echo "Setting up protection domain"
apstat -P | grep ${PDOMAIN} || apmgr pdomain -c -u ${PDOMAIN}

echo "Starting up application"
aprun -n 4 -N 2 -cc none -d 32 -p ${PDOMAIN} ... 

echo "Destroying protection domain"
apmgr pdomain -r -u ${PDOMAIN}