MPI changes the command line arguments

Heiko Wolf heiko.wolf at dlr.de
Tue Mar 19 08:47:53 EST 2002


Hi there,

I.ve got a Python script that should run parallel. So I access
MPI-funtions to put it on different processors. That works fine until
commandline arguments come into play... I want to pass a script file
that should be read.

For the first process, this works fine, the script file is simply
sys.argv[1]. But from the second process on, the name of the script
file is not in sys.argv anymore... MPICH just changes the commandline
parameters... But there is something even more astonishing:
As I pass the commandline arguments to the C-function MPI_init() and
do a printf() there, everything is in its right order, the name of the
script_file is just argv[1]!!!

Has anyone experienced similar problems?
What would be a solution for this?

Thanks, Heiko



More information about the Python-list mailing list