#!/bin/bash
############################################################
## Atipa Technologies
## PBS Job Script
## (c) 2001-2002 Atipa Technologies, All rights reserved
############################################################

# $Id:$

### Set the job name
#PBS -N Mas

### Set the queue to submit this job. 
#PBS -q cism-mpi

### Set the number of nodes that will be used. 
#PBS -l nodes=1:ppn=1

### Join the standard output and error files into one file.
#PBS -j oe

### Set the mail receivers
#PBS -M pete@peteriley.org

### Set the mail options to send mail when job is 
### started execution("b") and terminated("e") or 
### interrupted by the shell("a")
#PBS -m ae

### Do not rerun this job if it fails
#PBS -r n

# Ensure to parse the script to set the env vars for the compiler you used.
. ~/bin/switch_intel_eth.sh

export NPROCS=`wc -l $PBS_NODEFILE |gawk '//{print $1}'`

echo The master node of this job is `hostname`
echo The working directory is `echo $PBS_O_WORKDIR`
echo The node file is $PBS_NODEFILE
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
echo This job runs on the following nodes:
echo `cat $PBS_NODEFILE`
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
echo This job has allocated $NPROCS nodes

echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"

cd /data/mikic/mas_empi/mega_run11/cr1988/inner/
./mas_61x71x64 mas >& mas-output.log

cd /data/mikic/mas_empi/mega_run11/cr1995/inner/
./mas_61x71x64 mas >& mas-output.log

cd /data/mikic/mas_empi/mega_run11/cr2004/inner/
./mas_61x71x64 mas >& mas-output.log

sleep 5
