Newsgroups: comp.parallel.mpi
From: dbc@ecs.soton.ac.uk (Bryan Carpenter)
Subject: Re: What are the parameters in MPI_Init ()?
Organization: Electronics and Computer Science, University of Southampton
Date: 12 Jul 95 09:11:01 GMT
Message-ID: <dbc.805540261@euclid>

In <1995Jul3.040710.18973@uxmail.ust.hk> ma_adlum@uxmail.ust.hk (Lum Wing Fung Adrian) writes:

>Dear all,
>	What are the arguements in the function MPI_Init?  What should
>I passed into it?  What is the usage of passing those parameters?  Should
>I just pass two NULL when start the program?  Thanks.

Assuming your talking about the C interface, they are pointers
to `argc' and `argv', as passed into `main'...

  int main(argc, argv) {
    MPI_Init(&argc, &argv) ;

    // ...

    MPI_Finalized() ;
  }

Some implementations of MPI (eg MPICH on P4) depend on the values of
these parameters, and even modify them.

This is one of the features of MPI that I dislike most.  I have a
communication library written in C, and built on top of MPI---ie it
uses the C interface to MPI.  This library is supposed to be callable
from Fortran.  Getting hold of `argc' and `argv' to initialise MPI in
that situation is convoluted and non-portable.

Bryan


