Thanks. Should probably go to the Fortran list as well (CC). Don't you guys think this is getting out of hand? E.g., prescribing (rather than recommending) a certain implementation path is certainly a novum. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Schulz, Martin Sent: Friday, September 30, 2011 4:36 AM To: Rasmussen, Craig E; Rolf Rabenseifner; Jeff Squyres Cc: Andreas Kn�pfer; Todd Gamblin; Tobias Hilbrich; MPI3 Tools Subject: [Mpi3-tools] Questions on the F2008 profiling interface issues Hi Rolf, Craig, and Jeff, I was in Dresden the last few days (visiting the Vampir group, in particular Andreas Knuepfer and Tobias Hilbrich who are responsible for their MPI wrappers) and we sat down to talk about the issues around the profiling interface in ticket #229. Here is a quick summary with a few questions that came up: * With the new Fortran symbol naming variants, there are 6 or 8 or 10 versions for every MPI subroutine. Tools could intercept all versions by providing own symbols for all versions. Now the problem: Within the wrapper function a tool needs to call the correct PMPI call which usually is the same prefix (either '_f08', '_f', '__' etc.) as the MPI call it is in. A mapping to matching C functions (as most tools do it now) is not possible due to problems with calling conventions for callback routines. * This problem is only there for Fortran, since in C we only have one interface and we are guaranteed that this is always there. * Would the following solution work? All wrappers for Fortran are written in Fortran instead of C. For every MPI function, there are 6 or 8 variants and all of them need to be provided by a tool. This would probably mean that we have to compile wrappers with all three calling conventions (mpif.h, use mpi_f and use mpi_f08) and then link them together? Then within the Fortran wrappers, one could safely call the plain Fortran name of the PMPI function. Based on the specification of the standard, the MPI implementation would then provide a matching Fortran "P" call that the Fortran compiler then needs to transform into the correct symbol name with one of the prefixes, the same way it works for the regular "MPI" routines. Does this sound right or are we missing something? Does this separate compilation of tool wrappers using all three methods and then linking them together really work? * I think you mentioned this before, but I forgot - why is the BINDC option in Chapter 16 coupled to the SUBARRAYS flag? Why are those not separate issue? * As discussed at the forum, if we want to keep our tools in C (which is probably still the easier and better option), we need to know the symbols on the "p" side and we need a portable way to figure this out. We talked about the solution of two groups of routines - one for which we have _f08 symbols for one for which we don't. Rolf, how will you add this to the standard, in particular how will you form those groups. * Once we have the groups, is the following correct? ** If the symbol pmpi_foo exists, then pmpi_bar exists for any bar ** If the symbol pmpi_foo_ exists, then pmpi_bar_ exists for any bar ** If the symbol pmpi_foo__ exists, then pmpi_bar__ exists for any bar ** If the symbol PMPI_Foo_f exists, then PMPI_Bar_f exists for any bar ** If the symbol pmpi_foo_f08 exists, then pmpi_bar_f08 exists for any bar in the group of _f08 routines defined in the standard, but does not exist for any other bar ** If the symbol pmpi_foo_f08_ exists, then pmpi_bar_f08_ exists for any bar in the group of _f08 routines defined in the standard, but does not exist for any other bar ** If the symbol pmpi_foo_f08__ exists, then pmpi_bar_f08__ exists for any bar in the group of _f08 routines defined in the standard, but does not exist for any other bar ** If the symbol PMPI_Foo_f08 exists, then PMPI_Bar_f08 exists for any bar in the group of _f08 routines defined in the standard, but does not exist for any other bar Is this correct and complete or am I missing any symbols. Does this all sound correct? We just wanted to make sure we understand all the nuances and have things right before the discussion on Monday. Thanks! Martin -- ________________________________________________________________________ Martin Schulz, [email protected], http://people.llnl.gov/schulzm CASC @ Lawrence Livermore National Laboratory, Livermore, USA _______________________________________________ Mpi3-tools mailing list [email protected] http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools -------------------------------------------------------------------------------------- Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052