#!/bin/bash                                                             
#$ -N nmr_nc_tzp_bMeCY
#$ -cwd                                                                 
#$ -masterq c8m24.q
#$ -pe c8m24_mpi 24

#Set an environment variable for the location of MPI
#$ -v MPIR_HOME=/usr/local/adf2009.01/bin/hpmpi
 
#The number of slots (CPUs) grid engine allocates
#is set as the variable $NSLOTS
echo "Got $NSLOTS slots."
 
# Use Grid-Engine rsh wrapper if available
# Need this to inherit the correct environment e.g. nice values
export PATH=$PATH
 
export TMPDIR=/scratch
export ADFHOME=/usr/local/adf2009.01
export ADFBIN=$ADFHOME/bin
export ADFRESOURCES=$ADFHOME/atomicdata
export SCMLICENSE=$ADFHOME/license
export SCM_TMPDIR=$TMPDIR
export SCM_USETMPDIR=yes
export SCM_NODOMAINCHECK=yes
export MPIDIR=$ADFHOME/bin/hpmpi
export PATH=$PATH:$MPIDIR/bin:$TMPDIR
        
export SCMWISH=""

$ADFBIN/nmr << eor

NMR
out TENS
Nuc 78 79
End


endinput
eor

echo QUEUE $QUEUE
echo PE $PE
echo NSCM $NSCM

echo $PWD
cd /scratch 
#ls -lR
rm -rf * 
