[Mpi3-tools] Fortran Wrappers in Fortran?
Marc-Andre Hermanns
m.a.hermanns at grs-sim.de
Tue Jun 4 10:43:00 CDT 2013
Dear all,
with the Fortran wrappers discussion taking off tomorrow, I wanted to
explicitly ask about something that has spooked around in my head for
some time, and I am unsure whether this is viable or not.
It does not solve the name mangling is general, but maybe it is an easy
approach in some cases, such as simple preinstrumented libraries.
The new Fortran interface comes only with Fortran 2008+ compilers,
because older compilers don't know all the new magic that is necessary
to make it work, right? This would mean that the compiler also has the C
interface capabilities of Fortran 2003.
Performance tools like Scalasca or Score-P, usually call
straight-forward C routines in the wrappers to generate the measurement
data and maybe do some simple computations in between. Usually, they
just pass the initial parameters through.
As most of our wrapper code is generated anyway. Would it be a viable
approach to
1) generate a C interface definition for the parts of the measurement
system in question to call the measurement routines from Fortran, and
2) generate Fortran wrappers that directly call the measurement system
through the generated interface and then call the Fortran version of
"PMPI_Func"?
Would the Fortran compiler then take care of all the name mangling
issues in this case?
Using Fortran wrappers calling the Fortran PMPI routines would also make
handle conversion (to call the C MPI wrapper) unnecessary and could save
overhead.
Cheers,
Marc-Andre
--
Marc-Andre Hermanns
German Research School for
Simulation Sciences GmbH
c/o Laboratory for Parallel Programming
52062 Aachen | Germany
Tel +49 241 80 99753
Fax +49 241 80 6 99753
Web www.grs-sim.de
Members: Forschungszentrum Jülich GmbH | RWTH Aachen University
Registered in the commercial register of the local court of
Düren (Amtsgericht Düren) under registration number HRB 5268
Registered office: Jülich
Executive board: Prof. Marek Behr, Ph.D | Prof. Dr. Sebastian M. Schmidt
More information about the mpiwg-tools
mailing list