Job script for multi node job

From: Subbarao Kanchi (ksubbu85_at_gmail.com)
Date: Fri Feb 14 2014 - 04:20:16 CST

Dear All,
            I am using compiled version of NAMD_2.9_Linux-x86_64-ibverbs.
The following job script is working for a single node but if I submit with
two/more nodes,job is running but using only one node and not using other
nodes. I am giving the script below and I do not able to figure the mistake
in the script. I will appreciate any suggestions.

Regards,
Subbu.

#!/bin/csh -f
#PBS -l nodes=2:ppn=32
#PBS -o /present_working_dir/out.out
#PBS -e /present_working_dir/err.out
#PBS -N test

cd $PBS_O_WORKDIR
cat $PBS_NODEFILE > temp.1
set nprocs = `wc -l < $PBS_NODEFILE`
echo $nprocs
setenv DO_PARALLEL "/home/NAMD_2.9_Linux-x86_64-ibverbs/charmrun
++remote-shell ssh ++nodelist nodelist +p$nprocs "
setenv exc "/home/NAMD_2.9_Linux-x86_64-ibverbs/namd2 "
                set j="e"
                set tot=0
   echo group main >> nodelist
                foreach i ( `cat temp.1` )
echo host $i >> nodelist
                        if ( $j != $i ) then
ssh -n $i mkdir -p /temp1_dir
ssh -n $i cp -r /present_working_dir/* /temp1_dir
echo "$i " >> t2
ssh -n $i limit >> t2
ssh -n $i limit memorylocked unlimited

                endif
                set j="$i"
                end
cd /temp1_dir

$DO_PARALLEL $exc namd.conf > namd.log

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2015 - 23:20:28 CST