[MPICH] Fortran Binding

Rajeev Thakur thakur at mcs.anl.gov
Fri Aug 17 20:33:23 CDT 2007


Since that is internal to MPICH, it is not needed. It is needed when you
don't know what types an implementation uses for handles. PnetCDF, being a
portable library, doesn't.

Rajeev

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov [mailto:owner-mpich-
> discuss at mcs.anl.gov] On Behalf Of Wei-keng Liao
> Sent: Friday, August 17, 2007 6:53 PM
> To: mpich-discuss at mcs.anl.gov
> Subject: [MPICH] Fortran Binding
> 
> 
> 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
>   MPI_Comm_f2c(*v1)
> instead of
>   (MPI_Comm)(*v1)
> 
> Same for v4 of type MPI_Info that it should be
>   MPI_Info_f2c(*v4)
> instead of
>   (MPI_Info)(*v4)
> 
> 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.
> 
> Wei-keng
> 





More information about the mpich-discuss mailing list