Re: REMD using PBS qeue

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Aug 22 2007 - 12:28:50 CDT

Hi Arturas,
could you please clarify, what exactly are you looking for? I've seen
the acronym REMD used to stand for at least "replica exchange molecular
dynamics" and "random expulsion molecular dynamics".

Assuming you're talking about the former (since there are scripts
distributed for that), then the answer to this question is dependent on
exactly how your environment treats spawned jobs. What you'll need to do
is make a copy of the generic spawn_namd_ssh proc found in
spawn_namd.tcl, and make a new one that obtains a hostlist from your
environment and opens a channel to each host with the appropriate
command sent. Then make sure than $spawn_namd_command in
replica_exchange.tcl is properly set to use this proc.

I know this sounds rather obtuse; to give an example, the following two
functions were the ones I wrote to run replica exchange on NCSA's abe;
hopefully you can use something similar for your purposes. On abe, the
list of hosts in an allocation is stored in the PBS_NODEFILE environment
variable, but mpirun can be overridden to read a node list from another
location with the -machinefile flag. Thus, these procedures split the
node list in PBS_NODEFILE into one node list for each job, and then
spawns a namd job on each target host. For simplicity, I use 8
processors (one abe node) per job here.

Peter

proc spawn_namd_abe {namd conffiles logfiles} {

  split_abe_hosts $conffiles 8
  foreach conf $conffiles log $logfiles {
    puts "Spawning job with with config file $conf"
    lappend channels [open \
      "| csh -c \"mpirun -disable-profiling -machinefile $conf.hosts -np
8 $namd $conf > $log\" << {} |& cat" "r"]
  }
  return $channels
}

proc split_abe_hosts {conffiles ppj} {
  global env
  set infile [open $env(PBS_NODEFILE) "r"]
  set allnodes [list]
  while {[gets $infile nodes] >= 0} {
    lappend allnodes $nodes
  }
  close $infile

  set firstnode 0
  foreach conf $conffiles {
   set outhostfile [open "$conf.hosts" "w"]
   set myhostlist [lrange $allnodes $firstnode [expr $firstnode + $ppj - 1]]
   foreach host $myhostlist {
     puts $outhostfile $host
   }
   puts "Spawning on $host"
   close $outhostfile
   incr firstnode $ppj
  }
}

Arturas Ziemys wrote:
> Hi,
>
> Could someone advise how to modify spawning script to lunch NAMD/REMD
> with help of PBS ? Especially, how to run in parallel.
>
> Best
> Arturas

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:08 CST