[mpich-discuss] Why does MPI_Init() get NULL argc and argv when running Fortran programs?

Rajeev Thakur thakur at mcs.anl.gov
Mon Dec 3 11:19:46 CST 2012

The Fortran binding for MPI_Init is


There are no command line arguments.


On Dec 3, 2012, at 6:22 AM, clara wrote:

> Hi,
> I added a print statement at the beginning of MPI_Init() in mpich2-1.4 in order to check the arguments of MPI_Init(). When running a Fortran program, e.g. ep.S.1, the arguments of MPI_Init() are NULL; however, when running a C program, e.g. is.S.1, *argc of MPI_Init() is 1 and (*argv)[0] points to the name of the executed file is.S.1.
> Can anyone tell us why there is difference in dealing with arguments of MPI_Init() between C and Fortran programs? How could arguments be transferred to MPI_Init() for Fortran programs in mpich2? Thanks.
> Best,
> Clara
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

More information about the discuss mailing list