(j3.2006) MPI usage problems in Fortran
Aleksandar Donev
donev1
Tue Mar 25 13:28:08 EDT 2008
Hello,
I am rejoining after a holiday, so catching up. A couple of comments:
On Friday 21 March 2008 10:13, Bill Long wrote:
> Another variation that has been discussed (and I would prefer) is to add
> a LANG= spec to the BIND( ) syntax, which would enable you to specify
> that an interface was for a function written in C and that type(C_VOID)
> would be allowed only in such an interface, and disallow allocatable,
> pointer, and assumed-shape for type(C_VOID) dummies.
I independently proposed pretty much the same thing Bill is proposing
[TYPE(C_VOID)+BIND(C,LANG="C")] on another list (MPI-3 Fortran). And Bill and
I don't often agree on Interop, if that means the proposal is not my personal
crazy idea :-)
I am still convinced that it is a much better idea than IGNORE(???) or any
variant thereof.
> Some of these ideas COULD be added into the C interop TR, which would be
> better than messing with the base f08 document.
SHOULD be added, IMO. If we are "improving Interop", let's improve it once and
for all...
On Friday 21 March 2008 13:09, Lionel, Steve wrote:
> When used for a dummy argument in a Fortran routine, it would have no
> effect on that routine in that it would use the argument as otherwise
> declared. VOID only affects interface matching rules.
What is the semantics of calling a routine whose argument is declared to
be "TYPE(X), VOID" and the actual is a REAL array??? What if the actual is a
real array of stride 25 bytes?
> We have many years of experience with NO_ARG_CHECK and it has not
> created any difficulties in semantics or implementation.
What you have implemented is a hack to lie and blatantly violate the strict
type-safety of the standard. It was illegal in F77, it is illegal in all
Fortran variants, and does NOT have a defined semantics within the Fortran
language. It may in C, and we may want to borrow that semantics. BUT, it
won't just happen magically. It is, IMO, not a good place to start
*standardization* process. We should *build* on top of existing features to
add new functionality, rather than *ignore* Fortran 90 and following.
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