Apache Airavata
#!/bin/sh
#PBS -m bae
#PBS -N n1
#PBS -q batch
#PBS -M ccg-admin@gridchem.uits.iu.edu
#PBS -j oe
#PBS -V
#PBS -l walltime=40:30:0,ncpus=16
#PBS -l mem=1000mb
#PBS -A ch87lmp
set -x
. /usr/share/modules/init/bash
module load torque/2.3.13_psc
module load globus/5.0.4
module load mpt/2.04
module load molpro/molpro2012.1
export X509_USER_PROXY=/brashear/gcommuni/ramasami/tempdirs/tempdir6o2fSGT/x509up_p18691.fileG2lqRK.1
###2007/05/03 export LD_LIBRARY_PATH=/usr/psc/globus/5.2.5/lib64:/usr/psc/globus/5.2.5/lib:/opt/intel/composer_xe_20
13_sp1.0.080/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/mpirt/lib/intel64:/opt/intel/composer_xe_201
3_sp1.0.080/ipp/../compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/ipp/lib/intel64:/opt/intel/composer_xe
_2013_sp1.0.080/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64:/opt/intel/composer_xe_20
13_sp1.0.080/tbb/lib/intel64/gcc4.1:/opt/intel/composer_xe_2013_sp1.0.080/compiler/lib/intel64:/opt/intel/composer_x
e_2013_sp1.0.080/mpirt/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/ipp/../compiler/lib/intel64:/opt/intel/comp
oser_xe_2013_sp1.0.080/ipp/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/compiler/lib/intel64:/opt/intel/compose
r_xe_2013_sp1.0.080/mkl/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/tbb/lib/intel64/gcc4.1:/opt/sgi/mpt/mpt-2.
04/lib:/opt/intel/composerxe-2011.3.174/mkl/lib/intel64 # NOT NEEDED
jobid=`echo $PBS_JOBID |sed 's/\..*//' `
jobdir="n1.blacklight.psc.teragrid.org.$jobid.141119"
export OutDir=/brashear/gcommuni/ramasami/ramasami_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 SCRATCH_BATCH=/brashear/gcommuni/ramasami/ramasami_proj/$jobdir/batch_scratch
if [ ! -d $SCRATCH_BATCH ] ; then
echo "Making dir: $SCRATCH_BATCH" ;
mkdir -p $SCRATCH_BATCH || exit 1;
fi
# change directory to SCRATCH_BATCH
cd $SCRATCH_BATCH
# 2006/03/31 make a link of the Outdir into OutDir for convenience
/bin/ln -s /brashear/gcommuni/ramasami/tempdirs/tempdir6o2fSGT $OutDir/
###which uberftp
###echo "DEBUG: TEMP01AAAAAA 20070301 skk "; ls -l $X509_USER_PROXY
cp -p /brashear/gcommuni/ramasami/tempdirs/tempdir6o2fSGT/n1.in .
Diskoutputfile_with_dir=$SCRATCH_BATCH/n1.out
/bin/ln -sf $Diskoutputfile_with_dir $OutDir/n1.out
trap ". /brashear/gcommuni/ramasami/tempdirs/tempdir6o2fSGT/qsubin18694_cleanup ; exit 99 " XCPU INT TERM CHLD
which molpro
echo 'SCRATCH is /brashear/gcommuni'
#Resetting SCRATCH to current directory
export SCRATCH=$SCRATCH_BATCH
/usr/local/packages/molpro/MOLPRO.2012.1/bin/molpro -n 1 n1.in >| $Diskoutputfile_with_dir
. /brashear/gcommuni/ramasami/tempdirs/tempdir6o2fSGT/qsubin18694_cleanup