[MPICH] Fortran Binding

Wei-keng Liao wkliao at ece.northwestern.edu
Fri Aug 17 18:53:18 CDT 2007

I am not sure if this problem has been raised in MPICH, but it has been 
reported in PnetCDF.

Under src/binding/f77, there are many places that use type cast but should 
use a f2c function. For example, in file file_openf.c, when calling 
MPI_File_open(), the first argument v1 of type MPI_Comm should be 
converted by
instead of

Same for v4 of type MPI_Info that it should be
instead of

So, The open call should look like
  MPI_File_open( MPI_Comm_f2c(*v1), p2, *v3, MPI_Info_f2c(*v4), &l5 );

There are many files in this directory needed to be corrected. Whenever it 
involves MPI_Datatype, MPI_Group, MPI_Request, MPI_File, MPI_Win, MPI_Op, 
and MPI_Info, the corresponding f2c functions should be used.

I can see these Fortran binding files are automatically generated. There 
must be a smart way to quickly change this.


More information about the mpich-discuss mailing list