[mpich-discuss] Parsing mpirun global options in main C

BAKER, MYLES D. (LARC-E302) myles.d.baker at nasa.gov
Mon Aug 27 06:31:08 CDT 2012


I'm by no means an expert, but it appears you are trying to parse arguments that are outside of the scope of your C program.

You might try wrapping an environment script around your mpirun calls and  C program. Do you use a job scheduler?

Good luck,
Myles

Connected by DROID on Verizon Wireless


-----Original message-----
From: "Gonzalo Martín Cruz" <gmcruz at arcos.inf.uc3m.es>
To: "mpich-discuss at mcs.anl.gov" <mpich-discuss at mcs.anl.gov>
Sent: Mon, Aug 27, 2012 11:20:33 GMT+00:00
Subject: [mpich-discuss] Parsing mpirun global options in main C

Hi,

I am trying to parse the command line global options for mpirun in the main section of my C program. For example, when I run:

mpirun -np 2 -machinefile hostfile ./myprogram 100

I would like to parse the seven arguments instead of these two only: "./myprogram" and "100".

I tried to parse the arguments before the MPI_Init call but at this point I already got only two arguments, I guess the mpirun executable "eats" the MPI specific arguments. I can't find the way to do that.

Thank you in advance,

Gonzalo Martin
Computer Architecture Group
Universidad Carlos III de Madrid
e-mail: gmcruz at arcos.inf.uc3m.es<mailto:gmcruz at arcos.inf.uc3m.es>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120827/ce128ac3/attachment.html>


More information about the mpich-discuss mailing list