[mpich-discuss] Compiling shared libraries with Fortran 77 compiler and unexpected option

Dave Goodell goodell at mcs.anl.gov
Wed Sep 7 13:38:15 CDT 2011


On Sep 7, 2011, at 12:09 PM CDT, Thomas Jahns wrote:

> On 09/07/2011 04:47 PM, Dave Goodell wrote:
>> The call to the fortran init routine happens in MPIR_Init_thread, which is a
>> function that is called by both MPI_Init and MPI_Init_thread to actually do
>> the work of initializing the MPI library.
>> 
>> I don't think you can separate the setbotf object from the main MPI library
>> as you are attempting to do.  The MPI library must be able to obtain the
>> addresses of the fortran common block variables or the Fortran bindings
>> simply will not work correctly.
> 
> but obtaining the addresses can be emulated from C, cfortran.h[1] has this.
> 
> Regards, Thomas
> 
> [1] http://www-zeus.desy.de/~burow/cfortran/
> iii) Using C to manipulate FORTRAN COMMON BLOCKS

This is appealing, but I don't have enough experience with interfacing Fortran to C to be able to determine if that would be an acceptable alternative implementation.  Perhaps Bill can comment on why the Fortran bindings are built this way instead of attempting to directly compute/access the Fortran common block addresses.

-Dave



More information about the mpich-discuss mailing list