Apache Airavata
#!/bin/sh
#SBATCH -J TO_CaCO3_16W_2
#SBATCH -p normal
#SBATCH -o TO_CaCO3_16W_2.o%j
##SBATCH -n 16
#SBATCH -N 16 -n 256
#SBATCH -t 1:30:0
#SBATCH --mail-user=ccg-admin@gridchem.uits.iu.edu
#SBATCH --mail-type=ALL
#SBATCH -A TG-CHE080068N
set -x
module load globus;
module load uberftp;
module load fftw3
export X509_USER_PROXY=
###2007/05/03 export LD_LIBRARY_PATH=/opt/apps/intel13/mvapich2/1.9/lib:/opt/apps/intel13/mvapich2/1.9/lib/shared:/opt/apps/i
ntel/13/composer_xe_2013.2.146/tbb/lib/intel64:/opt/apps/intel/13/composer_xe_2013.2.146/compiler/lib/intel64:/opt/intel/mic/
coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/opt/apps/intel/13/composer_xe_2013.2.146/mpirt/lib/intel64:/opt/apps/intel
/13/composer_xe_2013.2.146/ipp/../compiler/lib/intel64:/opt/apps/intel/13/composer_xe_2013.2.146/ipp/lib/intel64:/opt/apps/in
tel/13/composer_xe_2013.2.146/compiler/lib/intel64:/opt/apps/intel/13/composer_xe_2013.2.146/mkl/lib/intel64:/opt/apps/intel/
13/composer_xe_2013.2.146/tbb/lib/intel64:/opt/apps/xsede/gsi-openssh-5.7/lib64:/opt/apps/xsede/gsi-openssh-5.7/lib64 # NOT
NEEDED
jobid=`echo $SLURM_JOBID |sed 's/\..*//' `
jobdir="TO_CaCO3_16W_2.stampede.tacc.utexas.edu.$jobid.141124"
export OutDir=/work/00421/ccguser/josuelop/josuelop_proj/$jobdir
#if [ ! -d $OutDir ] ; then
# echo "Making dir: $OutDir";
# mkdir -p $OutDir || exit 1; # let us stop if we can not make this dir - it is too important
#fi
# we need to export SCRATCH_BATCH
export HOME_BATCH=/work/00421/ccguser/josuelop/josuelop_proj/$jobdir
export SCRATCH_BATCH=/scratch/00421/ccguser/$SLURM_JOBID
if [ ! -d $SCRATCH_BATCH ] ; then
mkdir -p $SCRATCH_BATCH
fi
if [ ! -d $HOME_BATCH ] ; then
echo "Linking HOME_BATCH to SCRATCH_BATH: $HOME_BATCH -> $SCRATCH_BATCH" ;
ln -s $SCRATCH_BATCH $HOME_BATCH || exit 1;
fi
# change directory to SCRATCH_BATCH
cd $SCRATCH_BATCH
pwd
# 2006/03/31 make a link of the Outdir into OutDir for convenience
#/bin/ln -s /work/00421/ccguser/josuelop/tempdirs/tempdir4kuDZ8D $OutDir/
###which uberftp
###echo "DEBUG: TEMP01AAAAAA 20070301 skk "; ls -l $X509_USER_PROXY
# 20140115:MVM - not sure where the best place to do this is
# need to copy files from ds_lammps/data to working directory to avoid having
# to upload them through Gridchem
# also not sure if there's a variable containig this path
#if [ tinker_monte = 'lammps' -o tinker_monte = "lammps_ds" ] ; then
# cp /home1/00421/ccguser/apps/ds_lammps/data/* .
#fi
cp -p /work/00421/ccguser/josuelop/tempdirs/tempdir4kuDZ8D/* .
Diskoutputfile_with_dir=$SCRATCH_BATCH/TO_CaCO3_16W_2.out
trap ". /work/00421/ccguser/josuelop/tempdirs/tempdir4kuDZ8D/qsubin38304_cleanup ; exit 99 " XCPU INT TERM CHLD
/home1/00421/ccguser/apps/tinker/tinker/bin/monte.x O16.xyz -k O16.key 20000 C 3.0 298 0.01 >| $Diskoutputfile_with_dir
. /work/00421/ccguser/josuelop/tempdirs/tempdir4kuDZ8D/qsubin38304_cleanup