MPICH, Fortran and command line arguments
rokrau at yahoo.com
Thu Sep 25 14:08:21 EDT 2003
I have a Fortran code that I am trying to run under Linux (Redhat-8)
using the Intel Fortran compiler 7.1 and mpich-220.127.116.11.
I start the code with
mpirun -np 2 code.x input.file
When the code starts it turns out that only the first instance, i.e.
the process with rank 0, sees the correct command line arguments,
namely input.file, the next process things the hostname I run on is the
first cmdl argument.
The MPI_Init manual page has this ugly little blurb about the problem:
Command line arguments are not provided to Fortran programs. More
precisely, non-standard Fortran routines such as getarg and iargc have
undefined behavior in MPI and in this implementation.
Does anyone here have experience or a recommendation how I can get the
other processes to see the command line arguments?
If I consider broadcasting them myself, is it at least guaranteed that
the first (rank 0) process will see the command line arguments?
How do you guys deal with that situation, short of rewriting the main
app in C of course :-)
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
More information about the Beowulf