(j3.2006) (SC22WG5.3699) Comment on N1761
Aleksandar Donev
donev1 at llnl.gov
Tue Dec 2 13:00:58 EST 2008
Hi,
> Note especially that MPI
> calls on scalar buffers can not be done in a backward compatible manner at
> all.
I am aware of this but it has nothing to do with MPI. It exists with all of C
Interop, and I have complained about it before, and J3/WG5 has explicitly
decided to keep it as it is. That is, a C routine for which one makes a
BIND(C) interface can either operate on scalars or on arrays, not on both.
But, you are convincing me that maybe we should work on fixing this for the
TR. We specifically wanted to "fix" it for assumed-rank dummies, that is, we
wanted to allow the actual to be either a scalar or an array. Let's discuss
and think about it, perhaps off-line on an Interop e-mail list?
> I agree. Isn't it also a hack to enforce rank-matching for assumed-size
> entities?
I don't understand. It is not about enforcing, it is about being able to
choose which specific to call from the generic. Without the matching rule one
has to come up with additional rules (you suggested one), which I am not
opposed to, IF it is done for all of Fortran and not just the TR.
> Additional C wrapper routines using the extended
> interop descriptors would be needed in the MPI interface. This is why they
> want to retain passing by address also in the Fortran interface.
I think that the following is workeable: MPI_Send uses pass-by-address, as it
already does. TYPE(*) fixes the problem of superfluous type-matching rules.
We need to figure out the scalar vs. array issue above, otherwise a TYPE(*)
assumed-size dummy buffer works fine, I believe?
Then, there can be other, new, possibly not even standardized, routines that
can handle pass-by-descriptor. It does not break backward compatibility
because they are new.
Best,
Aleks
--
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816 Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev
More information about the J3
mailing list