Apache Airavata
#!/bin/sh
#PBS -m bae
#PBS -N test1
#PBS -q normal
#PBS -M ccg-admin@ccg-mw2.ncsa.uiuc.edu
#PBS -V
#PBS -j oe
#PBS -l walltime=24:0:0,nodes=1:ppn=4
#PBS -A uic151
set -x
. /etc/profile.d/modules.sh;
module load globus;
module load uberftp;
module load qchem;
export X509_USER_PROXY=/home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/x509up_p17178.fileYwCIvR.1
###2007/05/03 export LD_LIBRARY_PATH=/opt/gnu/gmp/lib:/opt/gnu/mpc/lib:/opt/gnu/gcc/lib64:/opt/gnu/mpfr/lib:/opt/gnu
/lib:/opt/gnu/lib64:/opt/mvapich2/pgi/ib/lib:/opt/pgi/linux86-64/13.2/libso # NOT NEEDED
jobid=`echo $PBS_JOBID |sed 's/\..*//' `
jobdir="test1.trestles.sdsc.teragrid.org.$jobid.140301"
export OutDir=/home/gridchem/ghoffman/ghoffman_proj/$jobdir
export OutDir0=/home/gridchem/ghoffman/ghoffman_proj
if [ ! -d $OutDir0 ] ; then
echo "Making dir: $OutDir0";
mkdir -p $OutDir0 || 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=/home/gridchem/ghoffman/ghoffman_proj/$jobdir
export SCRATCH_BATCH=/oasis/scratch/trestles/$USER/$PBS_JOBID
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 /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2 $OutDir/
###which uberftp
###echo "DEBUG: TEMP01AAAAAA 20070301 skk "; ls -l $X509_USER_PROXY
cp -p /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/oh3w5pceomipt16.in .
Diskoutputfile_with_dir=$SCRATCH_BATCH/oh3w5pceomipt16.out
trap ". /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/qsubin17248_cleanup ; exit 99 " XCPU INT TERM CHLD
QCSCRATCH=/oasis/scratch/trestles/$USER/$PBS_JOBID
QCLOCALSCR=/oasis/scratch/trestles/$USER/$PBS_JOBID
cp -p /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/oh3w5pceomipt16.in /oasis/scratch/trestles/$USER/$PBS_JOBID
qchem -nt 4 /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/oh3w5pceomipt16.in $Diskoutputfile_with_dir
. /home/gridchem/ghoffman/tempdirs/tempdiruYKWXR2/qsubin17248_cleanup