Apache Airavata
#!/bin/sh
#PBS -m bae
#PBS -N butadienegeometry
#PBS -q shared
#PBS -M ccg-admin@ccg-mw2.ncsa.uiuc.edu
#PBS -V
#PBS -j oe
#PBS -l walltime=1:30:0,nodes=1:ppn=1
#PBS -A uic151
set -x
. /etc/profile.d/modules.sh;
module load globus;
module load uberftp;
module load gamess
export X509_USER_PROXY=/home/gridchem/moor1577/tempdirs/tempdirvT4JIpO/x509up_p15544.filelJWCyi.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="butadienegeometry.trestles.sdsc.teragrid.org.$jobid.140916"
export OutDir=/home/gridchem/moor1577/moor1577_proj/$jobdir
export OutDir0=/home/gridchem/moor1577/moor1577_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/moor1577/moor1577_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/moor1577/tempdirs/tempdirvT4JIpO $OutDir/
###which uberftp
###echo "DEBUG: TEMP01AAAAAA 20070301 skk "; ls -l $X509_USER_PROXY
cp -p /home/gridchem/moor1577/tempdirs/tempdirvT4JIpO/butadieneinputfile.inp .
Diskoutputfile_with_dir=$SCRATCH_BATCH/butadienegeometry.out
trap ". /home/gridchem/moor1577/tempdirs/tempdirvT4JIpO/qsubin15549_cleanup ; exit 99 " XCPU INT TERM CHLD
tmp=`echo $PATH | wc -c ` ; if [ $tmp -gt 750 ] ; then echo "YOU HAVE A PATH LENGTH OF $tmp CHARACTERS - SO YOU ARE
APPROACHING OR YOU ARE OVER THE GAMESS_STUPIDITY PATH LENGTH OF 846 - PLEASE CLEAN PATH "; fi
echo "length of path : \$tmp"
/home/diag/opt/gamess/rungms butadieneinputfile 00 1 > $Diskoutputfile_with_dir
. /home/gridchem/moor1577/tempdirs/tempdirvT4JIpO/qsubin15549_cleanup