#!/bin/bash
#PBS -N nebpar
#PBS -j oe
#PBS -l nodes=4:ppn=2,walltime=160:00:00
#PBS -V

### ---------------------------------------
### BEGINNING OF EXECUTION
### ---------------------------------------

echo The master node of this job is `hostname`
echo The working directory is `echo $PBS_O_WORKDIR`
echo This job runs on the following nodes:
echo `cat $PBS_NODEFILE`

ncpu=`cat $PBS_NODEFILE | wc -w`
echo "Number of processors = $ncpu "
### end of information preamble

cd $PBS_O_WORKDIR

echo $PWD

lamboot $PBS_NODEFILE # starts lam on the specified nodes

#echo $PWD

cmd="mpiexec -np $ncpu bin/sw_mpich scripts/work/si_neb/si-kink-nebmep-parallel.tcl"
time $cmd 

#./cmd >& $PWD/lammps.log

#mpiexec -np 4 ./lmp_g++ < in.min
#mpiexec ./lmp_g++ -i in.min
#./lmp_g++ < in.min

wipe $PBS_NODEFILE

#cmd="mpiexec vasp"
#echo "running mpirun with: $cmd in directory "`pwd`
#$cmd >& $PWD/vasp.log

#PBS_O_WORKDIR=vasp.4.6
#cmd="mpiexec $PBS_O_WORKDIR/vasp"
#echo "running mpirun with: $cmd in directory "`pwd`
#$cmd >& $PBS_O_WORKDIR/vasp.log

