As far as I understand the C implementation of MPI
, the MPI_Init
function makes no use of arguments &argc
and &argv
passed to it. The mpiexec
or mpirun
probably runs multiple programs and passes the MPI_COMM_WORLD
object to each of the processes through some datastream externally (so that each program can extract information like size, rank etc. - Please correct me here).
When I check the argv[ ] strings, it contains only the program path.
So I think that signature of MPI_Init must be MPI_Init(void)
instead of MPI_Init(int* argc, char*** argv)
. Is there any reason for passing arguments to MPI_Init? or is it defined this way for future usage if any?