#!/bin/bash
#
#$ -pe mpich 2
#$ -cwd -V
#$ -q parallel-short.q
#$ -N pREMD2_san
#$ -A barran
#$ -R y
#$ -l h_rt=03:00:00
#$ -l shortpriop=true

cat /users/jkalapothakis/.mpich/mpich_hosts.$JOB_ID | cut -f 1 -d . | sort | fmt -w 30
export scratch=/scratch/barran/jkalapothakis
sed s/$/:4/ /users/jkalapothakis/.mpich/mpich_hosts.$JOB_ID > /users/jkalapothakis/.mpich/ndfile.$JOB_ID
ln -s -f /usr/local/amber9/exe/sander_mpi /users/jkalapothakis/tests/rex/2-proc/sander
/usr/local/mpich-mx-1.1.3-PGI/bin/mpirun.ch_mx -np 8 -machinefile /users/jkalapothakis/.mpich/ndfile.$JOB_ID /users/jkalapothakis/tests/rex/2-proc/sander -ng 2 -groupfile groupfile
