Re: [mpich-discuss] How to run program with arguments with mpich3
Hi, Nobody has replied/advised and let me try another email before I give up on mpich3. The problem seems to be related to the "command line arguments" in my application (mcnpx). It worked in MPICH1 and I found the following in your user guide: https://www.mpich.org/static/downloads/3.3/mpich-3.3-userguide.pdf, you guys said : ======================================================================== MPICH1 (more precisely MPICH1's mpirun) required access to command line arguments in all application programs, including Fortran ones, and configure devoted some e ort to nding the libraries that contained the right versions of iargc and getarg and including those libraries with which the mpifort script linked MPI programs. Since MPICH does not require access to command line arguments to applications, these functions are optional, and configure does nothing special with them. If you need them in your applications, you will have to ensure that they are available in the Fortran environment you are using ================================================================== Why do I need to do when compiling MPICH3 (or mcnpx) to take care of the "iargc"/"getarg" part as mentioned in this note ?? I just ran mpich3 like mpich1 : $ ~/mpich3/bin/mpirun -np 5 -f machines ~kinyip/v270/bin/mpich3/mcnpx i=ptest n=ptest1. That's, putting the arguments "i=ptest n=ptest1." behind the application "mcnpx". Is it the normal way of using mpich3 ?? In your user guide, you don't have an example of running your application with argument. Can you please comment here ??? Kin -------- Forwarded Message -------- Subject: How to run program with arguments with mpich3 Date: Tue, 5 Mar 2019 10:01:48 -0500 From: Yip, Kin <[email protected]><mailto:[email protected]> To: [email protected]<mailto:[email protected]> <[email protected]><mailto:[email protected]> Hi, I've got an old code which works in MPICH1 (or 2). Now, I try to use MPICH3 . I've compiled MPICH3.2.1 with: env F77_GETARGDECL=" " CC="gcc" CXX="g++" FC="gfortran -ff2c -fno-second-underscore" ./configure --with-pm=hydra:gforker:remshell --enable-f90 --enable-f77 --enable-sharedlib --prefix=$HOME/mpich3 and then used it to compile the old code (MCNPX). When I run, $ ~/mpich3/bin/mpirun -np 5 -f machines ~kinyip/v270/bin/mpich3/mcnpx i=ptest n=ptest1. I've always got the error : bad trouble in mcnpx in routine getexm invalid number of command line arguments - use mpirun. It seems that it doesn't understand the "argument" above, which is " i=ptest n=ptest1. ". The gfortran does understand getarg etc. (otherwise, it'd not work with MPICH1). Do you have any advice to solve the "argument" problem.?? Kin
participants (1)
-
Yip, Kin