[MPI3 Fortran] Teleconference Wednesday, Sept. 17: Summary

Jeff Squyres jsquyres at cisco.com
Thu Sep 18 07:43:43 CDT 2008


On Sep 17, 2008, at 4:31 PM, Aleksandar Donev wrote:

>> Would it be reasonable for
>> Fortran to use the same argument lists as C++, to avoid having yet a
>> third set?
> If Fortran's interface is based on C Interop (for example, it uses  
> BIND(C),
> C_INT, etc.), then it should follow the C interface, BUT, if a  
> simplification
> is possible (e.g., a dummy argument can be omitted or makes no sense  
> in one
> language), I don't see a problem with that. They are different  
> languages,
> after all. Some C interfaces simply cannot really be used from Fortran
> without great contortions (e.g., anything accepting arrays of  
> strings char**
> or some such), and I see no reason why we cannot simply change the  
> interface
> to make it friendlier to Fortran.

Yes, this is more in-line with what I was suggesting.

I am *not* suggesting that we have a completely different set of  
bindings for Fortran than C.  Please note that the C++ bindings are  
*very* similar to the C bindings -- there are only a small number of  
routines where [effectively] optional arguments are simply dropped  
from the C++ bindings.

All I was suggesting is that we might be able to do the same thing for  
new Fortran MPI bindings.  And if there are parameter datatype/ 
constructs in C that simply do not match that of Fortran, we can adapt  
those bindings for Fortran as well.

The reason that the Fortran bindings need to be at least modeled on  
the C bindings is because if we deviate too far, then the  
functionality changes.  And then it's not really the same MPI spec --  
it's a new spec.  So we need to stay only within the scope of creating  
Fortran-specific *bindings*, not Fortran-specific *functionality*.

To be [hopefully] totally clear: MPI defines functions in a language- 
neutral way.  So we're not actually modeling on the C bindings, we're  
really modeling on the language-neutral bindings.  But since most  
(all?) modern MPIs are really implemented in C, it helps us  
implementors out if other language bindings map relatively easily to  
C.  The various languages' bindings can adapt to make them relevant,  
but cannot change the MPI-defined functionality.  Dropping an optional  
argument from the parameter list is within the scope of a language  
binding.  Using a suitable parameter data construct (strings vs.  
char*) is also within the scope of the language binding.  Changing the  
functionality (e.g., implying the MPI_Datatype parameter value) is  
likely not within the scope of a language-specific binding.

-- 
Jeff Squyres
Cisco Systems




More information about the mpiwg-fortran mailing list