Re: Amber7 and mpirun on Linux

From: Scott Brozell <sbrozell.scripps.edu>
Date: Thu, 10 Apr 2003 12:28:00 -0700

Hello,

Using Google to search for 'Amber p4pg' one finds
answers to this problem in the Amber Reflector Archive, e.g.:
http://amber.ch.ic.ac.uk/archive/200012/0012.html

> >However, when we try and submit a job to sander we get a error
> >
> >> mpirun -np 10 /usr/local/amber6/exe/sander etc. etc.
> >
> > unknown flag:
> >-p4pg
>
> MPICH uses a few extra flags to pass information to the application.
> p4pg tells where the p4 procgroup file (automatically generated by mpirun)
> is. Normally AMBER ignores the p4pg flag (see mdfil.f).
>
> I would suggest you check your mdfil.f to make sure it skips p4pg.
> Amber-6.0 should skip it, do you have a "test" version of AMBER6 or did
> you change the source code in any way?
>
> Dave

In particular, in amber7/src/sander/mdfil.f
     142 elseif (arg .eq. '-mdip') then
     143 iarg = iarg + 1
     144 call getarg(iarg,mddip)
     145 #ifdef MPI
     146 elseif (arg .eq. '-p4pg') then
     147 iarg = iarg+1
     148 elseif (arg .eq. '-p4wd') then
     149 iarg = iarg+1
     150 elseif (arg .eq. '-np') then
     151 iarg = iarg+1
     152 elseif (arg .eq. '-mpedbg') then
     153 continue
     154 elseif (arg .eq. '-dbx') then
     155 continue
     156 elseif (arg .eq. '-gdb') then
     157 continue
     158 #endif

lines 146 and 147 implement the logic to skip the -p4pg argument.


On a separate issue, it appears that Machine.pgf77_mpi is not
optimal in that it omits the Run Length Encoding, RLE, and
ReOrder WATer, ROWAT, options. These improve the MPI performance.
Furthermore, we suggest that one compile with pgf90 which enables
usage of dynamic MEMory ALLOCation, MEM_ALLOC, thus bypassing most
array size limits.
I call this Machine.pgf90_mpi:
#! /bin/csh -f
########################################################################
# #
# Copyright (c) 1986, 1991, 1995 #
# Regents of the University of California #
# #
# All Rights Reserved #
# #
# Machine Dependency Handling System #
# #
# Bill Ross ross.cgl.ucsf.edu #
# An extension of work of George Seibel #
# #
# Dependencies written by various authors. #
# #
# Permission to use, copy, modify, and distribute this software and #
# its documentation for any purpose and without fee is hereby #
# granted, provided that the above copyright notice appear in all #
# copies and that both that copyright notice and this permission #
# notice appear in supporting documentation, and that the name of #
# the University of California not be used in advertising or #
# publicity pertaining to distribution of the software without #
# specific, written prior permission. #
# #
# THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL #
# WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED #
# WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE #
# UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR #
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM #
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, #
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN #
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #
# #
########################################################################

#
setenv MACHINE "linux/FreeBSD/Windows PC"
setenv MACH Linux
setenv MACHINEFLAGS "-DMPI -DRLE -DROWAT -DMEM_ALLOC"

# CPP is the cpp for this machine
setenv CPP "/lib/cpp -traditional"
setenv CC "pgcc "
setenv LOADCC "pgcc "

# SYSDIR is the name of the system-specific source directory relative to src/*/
setenv SYSDIR Machines/standard

# COMPILER ALIASES:
setenv FC "pgf90"
setenv OPT_0 "-g -tp p6 -Mnoframe -Msecond_underscore"
setenv OPT_1 "-O2 -Munroll -tp p6 -Mnoframe -Msecond_underscore"
setenv OPT_2 "-O2 -Munroll -tp p6 -Mnoframe -Msecond_underscore"
setenv OPT_3 "-O2 -Munroll -tp p6 -Mnoframe -Msecond_underscore"

# LOADER/LINKER:
setenv LOAD "pgf90 "
setenv LOADLIB "-lm "

# little or no optimization:
setenv L0 "$FC -c $OPT_0"

# modest optimization (local scalar):
setenv L1 "$FC -c $OPT_1"

# high scalar optimization (but not vectorization):
setenv L2 "$FC -c $OPT_2"

# high optimization (may be vectorization, not parallelization):
setenv L3 "$FC -c $OPT_3"

# ranlib, if it exists
setenv RANLIB ranlib


Scott Brozell

On Thu, 10 Apr 2003, Wen Li wrote:

> Hello everyone,
>
> I installed Amber7 on our Beowulf Linux cluster using the machine file
> Machine.pgf77_mpi. The PBS has not installed on our cluster at this
> moment so I just tried to run Amber using:
>
> mpirun -np 4 /usr/local/amber/amber7/exe/sander -O -i min.in -p del.top
> -c del.crd -o del.out -r del.rst
>
> I got the error message: unknown flag: -p4pg
>
> Could you please tell me how to remove the error, thanks!
>
> Wen
>
Received on Thu Apr 10 2003 - 20:53:00 PDT
Custom Search