Re: AMBER: amber/pmemd with mpiexec

From: Lubos Vrbka <shnek.tiscali.cz>
Date: Sun, 11 Apr 2004 16:00:36 +0200

bob,

> If you really need this, for pmemd just edit get_cmdline.f90 to
> include -execer_id as something that is filtered out in the mpi code. First
> grep for "-np", see what is done to filter it out, and do the same thing
> for -execer_id. You can do the same thing in sander; the relevant code is
> in mdfil.f.
thanks for hint... it is working now. since i don't know fortran at all,
i'm not sure whether my modification is correct in the sense of syntax
and fortran-programming habits, but anyway i post it here just in case
it would be useful for someone in the future...

this change is necessary (i think) only for openpbs/pbspro queuing
system and submission with p4 mode of mpich via mpiexec program. shmem
mode submission with mpiexec works fine.

mpiexec doesn't use mpirun, but connects to appropriate nodes and start
jobs by itself. it has some advantages over mpirun:

- gets the information for all running processes directly from PBS, so
it always has the correct information about e.g. cpu load, ...
- it properly kills all jobs when requested by user. mpirun-started p4
jobs that are killed by user often don't quit and remain as zombies on
the computer nodes, ...

! modification to enable mpiexec submission/execution
! add after line 164 in the original pmemd-3.1 file get_cmdline.f90
            else if (arg .eq. '-execer_id') then
               iarg = iarg + 1
            else if (arg .eq. '-master_host') then
               iarg = iarg + 1
            else if (arg .eq. '-my_hostname') then
               iarg = iarg + 1
            else if (arg .eq. '-my_nodenum') then
               iarg = iarg + 1
            else if (arg .eq. '-my_numprocs') then
               iarg = iarg + 1
            else if (arg .eq. '-total_numnodes') then
               iarg = iarg + 1
            else if (arg .eq. '-master_port') then
               iarg = iarg + 1
            else if (arg .eq. '-remote_info') then
               ! format: -remote_info <hostname> <procs-on-that-node> ...
               iarg = iarg + 1
               ! to filter out all "hostname - procs" pairs
               ! we do it one by one till the '-' is the first
               ! character in the argument or end-of-parameters
               ! occurs
               do
                  if (iarg .eq. indx) then
                     exit
                  end if
                  call getarg(iarg,arg)
                  if (arg(1:1) .eq. '-') then
                     exit
                  else
                     iarg = iarg + 1
                  end if
               end do

is there any chance to have this supported in some future releases of amber?

regards,

-- 
Lubos
_._"
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Sun Apr 11 2004 - 15:53:00 PDT
Custom Search