(j3.2006) MPI usage problems in Fortran
Bill Long
longb
Fri Mar 21 17:21:50 EDT 2008
Lionel, Steve wrote:
> I'd be perfectly happy to let VOID be usable from Fortran code. We
> already support this with our ATTRIBUTES NO_ARG_CHECK directive and we
> make use of it in our implementation of ISO_C_BINDING (which contains a
> fair bit of Fortran code.)
>
> VOID could be used with any type declaration in a dummy argument
> declaration, including POINTER and ALLOCATABLE arguments and
> assumed-shape arrays. The semantics are that the TKR match rule does
> not apply to that dummy. Other argument rules still apply.
>
> In the Intel implementation of NO_ARG_CHECK, it is not permitted in a
> generic spec nor for a PURE or ELEMENTAL routine. We also limit
> NO_ARG_CHECK to an INTERFACE block or a module procedure.
>
> 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.
>
OK. Your no_arg_check directive sounds like similar things I've seen in
other compilers. It is useful. The version we had thought about was an
IGNORE attribute that took an argument, similar to the syntax for
INTENT. It would apply only to declarations of dummy arguments. Thus
IGNORE(T) would ignore type mismatches.
IGNORE(K) would ignore kind mismatches.
IGNORE(R) would ignore rank mismatches.
Combinations would be allowed, such as
IGNORE(TKR) which would ignore type, kind, and rank mismatches.
This provides quite a bit of flexibility. For example, you could ignore
rank but still get type checking. Since partial checking is possible,
use in a generic interface would be useful and allowed. I prefer IGNORE
somewhat to VOID in the sense that VOID sounds like a TYPE, which could
be confusing. One advantage of this scheme is that, as you suggested, it
works in a Fortran setting just as well as in an interface to a C
routine. In that way, the LANG= bit would not be necessary. And I
believe it would solved Craig's problems with MPI interfaces.
Cheers,
Bill
> We have many years of experience with NO_ARG_CHECK and it has not
> created any difficulties in semantics or implementation.
>
> Steve Lionel
> Developer Products Division
> Intel Corporation
> Nashua, NH
>
>
>
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list