Log in Page Discussion History Go to the site toolbox

CAML NAMD Install

From Engineering Grid Wiki

Using the binary distribution from http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD , follow the readme.


A special SGE PE must be set up, the definition file for the PE is:

pe_name           namd
slots             64
user_lists        NONE
xuser_lists       NONE
start_proc_args   /cluster/caml/sge/namd/start-namd.sh $pe_hostfile
stop_proc_args    /bin/true
allocation_rule   $fill_up
control_slaves    FALSE
job_is_first_task TRUE
urgency_slots     min

The start-namd.sh script is:

#!/bin/sh

## This is an init script for NAMD jobs run under Grid Engine on 
## clusters with Ethernet interconnects who want to launch parallel
## NAMD jobs that use the built in charm++ communication subsystem
## rather than MPI. Based on the SGI startmpi.sh example code.

## This script is necessary because SGE will create a custom hostfile
## for the NAMD job that is slightly incorrect with res pect to the format
## of the hostfile that the 'charmrun' program expects. 

## For example - a 5-CPU job spanning 2 nodes with 3 tasks on one
## system and 2 tasks on a second system would be written out
## by Grid Engine in the format:
##
##  compute01 3
##  compute02 2
##
## This format of "<hostname> <# slots>" is not recognized by 'charmrun' which would
## expect a file with this format to perform the same task:
##
## group main
##  host compute01
##  host compute01
##  host compute01
##  host compute02
##  host compute02
##
## The pupose of this init script is to take the custom hostfile generated
## by Grid Engine ($PE_HOSTFILE), transform it to the proper format and write
## it back out to the fileh $TMPDIR/namd-machines. (don't worry about collisions
## between multiple NAMD jobs ... $TMPDIR is unique for each job)
##
## Then we can run NAMD jobs that read $TMPDIR/namd-machines to learn their
## parallel host assignments...


PeHostfile2MachineFile()
{
   echo "group main"
   cat $1 | while read line; do
      # echo $line
      host=`echo $line|cut -f1 -d" "|cut -f1 -d"."`
      nslots=`echo $line|cut -f2 -d" "`
      i=1
      while [ $i -le $nslots ]; do
         echo " host $host"
         i=`expr $i + 1`
      done
   done
}

me=`basename $0`

# test number of args
if [ $# -ne 1 ]; then
   echo "$me: got wrong number of arguments" >&2
   exit 1
fi

# get arguments
pe_hostfile=$1

# ensure pe_hostfile is readable
if [ ! -r $pe_hostfile ]; then
   echo "$me: can't read $pe_hostfile" >&2
   exit 1
fi

# create machine-file
# remove column with number of slots per queue

machines="$TMPDIR/namd-machines"

PeHostfile2MachineFile $pe_hostfile >> $machines

# signal success
exit 0

Site Toolbox:

Personal tools
This page was last modified on 3 December 2009, at 10:31. - This page has been accessed 1,818 times. - Disclaimers - About Engineering Grid Wiki