[MPI3 Fortran] Summary of items on the table

Bill Long longb at cray.com
Mon Apr 28 18:02:27 CDT 2008



Craig Rasmussen wrote:
>
> On Apr 28, 2008, at 2:20 PM, Aleksandar Donev wrote:
>
>> On Monday 28 April 2008 12:49, Lionel, Steve wrote:
>>
>>> My personal preference is for choice 4, the IGNORE attribute (the
>>> specific spelling can be debated...
>>> There seems to be strong sentiment with some
>>> against such a thing, which I don't fully understand.
>> Steve, I will throw this one back at you. I asked earlier, but never 
>> got a
>> response:
>>
>> What happens if the dummy (with the IGNORE attribute) is declared as
>> INTEGER(4), and things are performed inside that the standard defines 
>> only
>> for 4-byte integers (e.g., some bit packing operation). Then, the 
>> routine is
>> called with a REAL(8) array? What if the array is of a derived type 
>> of size 1
>> byte?
>>
>> What specifically will Intel Fortran do? Compile and give results 
>> that make no
>> sense? If so, the standard must have *specific* restrictions on what the
>> actual is allowed to be, and what it means. Only illegal cases can be 
>> left
>> without a meaning.
>>
>> What does Cray do?
>>
>> If the routine is written in C and has a void* argument, I understand 
>> how it
>> works. But I do not understand how it works if "everything is written in
>> Fortran".
>
> I don't understand either.  I assume I must declare a TKR for the 
> dummy and then tell the compiler to ignore what I have just declared?  
> What can I do in the Fortran procedure?  I can't think of anything 
> very useful.  I can't define it can I.  I think we still require LANG=C.

The TKR ignore directives (and, I assume a similar attribute) affect 
only argument checking.  Essentially the effect is to suppress error 
messages.

Once inside the subprogram, you treat the dummy argument with the type, 
kind, and rank it was declared with.  The only thing you skip is 
argument conformance checking.

Traditionally these directives have been used in two environments.  One 
is in archaic Fortran subroutines, typically named COPY or MOVE, that 
just do block memory copies.  These were often written with integer 
arguments, but called with integer, real, or complex arguments.  If the 
element size did not match, the user adjusted the number of elements to 
be copied.  Such routines have no place in modern codes, but they still 
exist in some dusty decks, and the directive is an easy way to "fix" the 
code with minimal source changes.  The other use of the directives is in 
interfaces for routines that are written in C that have void * 
arguments.  In other words, like MPI case, which, when you think about 
it, is just another variant of the COPY/MOVE operations.

>
> Perhaps I could use IGNORE(R) if the dummy were declared as a rank 1 
> array.  However, I believe I can get the same thing with a assumed 
> size, rank 1 dummy.  At least the compiler I tried allowed me to call 
> with a rank 2 actual.

Right. And if ignore(tkr) were added to the standard, there would be 
some limitations.  Dummies that were represented by dope vectors would 
not be reasonable, for example.

Cheers,
Bill


>
> Craig
>
>

-- 
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 mpiwg-fortran mailing list