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

Pavan Balaji balaji at mcs.anl.gov
Mon Aug 27 07:26:07 CDT 2012


Why do you need the remaining arguments?  There are other ways in MPI to 
get this information.

  -- Pavan

On 08/27/2012 06:20 AM, Gonzalo Martín Cruz wrote:
> 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>
>
>
>
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list