Last active
July 19, 2017 14:38
-
-
Save zhulianhua/1a48893eb7c9dc2b5c39de698d9842fb to your computer and use it in GitHub Desktop.
qsub passing an environment variable via cmd options -v
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash --login | |
#PBS -N test | |
#PBS -A e283 | |
#PBS -l select=1 | |
#PBS -l walltime=0:20:00 | |
##PBS -m abe | |
#PBS -M [email protected] | |
# Switch to current working directory | |
export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR) | |
cd $PBS_O_WORKDIR | |
#### MODE is build or debug | |
if [ "x" == "x$MODE" ] ; then | |
echo "MODE is not set, I'll set it to build" | |
MODE=build | |
else | |
echo "MODE is: $MODE" | |
fi | |
export PATH=$PATH:/work/e283/e283/lhzhu/mpi_dvm3d/$MODE | |
date | |
aprun -n 4 -N 4 dvm3d.x > log | |
date | |
### submit it using | |
# qsub [-v MODE=debug] job.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment