[MPI3 Fortran] [Mpi3-tools] Issues with Fortran bindings for MPI_Pcontrol

Schulz, Martin schulzm at llnl.gov
Tue Apr 16 09:21:52 CDT 2013


On Apr 16, 2013, at 2:11 AM, "N.M. Maclaren" <nmm1 at cam.ac.uk>
 wrote:

> On Apr 15 2013, Bill Long wrote:
>> 
>> On 4/15/13 4:38 PM, Schulz, Martin wrote:
>>> As a first simple approach, this could be done with
>>> 
>>> MPI_Pcontrol_new(MPI_Info info)
>> 
>> The original question seemed specific to the Fortran interface for MPI_PCONTROL.  Would it be possible to keep the C interface, either as is or modified as suggested above, but delete the Fortran interface for this routine?  That solves the immediate issue.
>> 
>> I would argue that the few people who use this routine are "expert users" who would have little trouble writing their own MY_PCONTROL, written in C but callable from Fortran that had whatever interoperable arguments were desired, and internally called the C MPI_Pcontrol function.
> 
> Or not even bother with MPI_Pcontrol, because it's less hassle to
> implement the whole thing from scratch and provide their own interfaces.
> I agree - this isn't likely to impact more than 0.1% of users, who are
> quite capable of resolving any difficulties.

I don't think that's quite true - Pcontrol is useful in many cases and is used by profilers (that are advertised as easy to use). It is certainly a bit more advanced usage, but in many cases we tell users where to put it, so they can run their code and get data, but it has to be easy for them to add it or they won't do it. Having to go through C in Fortran codes is not really a workable solution in this case. That's also how we ran into the problem that we are discussing: we had a user new to performance analysis during a tutorial and he wanted to profile a particular snapshot and so we asked him to add the calls. Due to the ierr issue, this crashed the code.

The only way to make only having a C call work would be a separate library, but then that defeats the purpose of adding something that can just stay in the code without having to link to special libraries (which was the main reason for adding MPI_Pcontrol). MPI_Pcontrol is (unlike MPI_T) intended to be used in the application code and hence should have bindings in all languages supported by MPI.

Martin


> 
> 
> Regards,
> Nick Maclaren.
> 

________________________________________________________________________
Martin Schulz, schulzm at llnl.gov, http://people.llnl.gov/schulzm
CASC @ Lawrence Livermore National Laboratory, Livermore, USA







More information about the mpiwg-fortran mailing list