[prev in list] [next in list] [prev in thread] [next in thread] 

List:       beowulf
Subject:    MPICH, Fortran and command line arguments
From:       Roland Krause <rokrau () yahoo ! com>
Date:       2003-09-25 18:08:21
[Download RAW message or body]

Hi all,
I have a Fortran code that I am trying to run under Linux (Redhat-8)
using the Intel Fortran compiler 7.1 and mpich-1.2.5.2. 

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 :-) 

Regards,
Roland


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit \
http://www.beowulf.org/mailman/listinfo/beowulf


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic