Subject: NUMBER_OF_PROCESSORS

From: David Loveman <[email-masked]>
Date: Wed, 13 May 92 05:27:37 PDT

Sorry for the delay in my reply to your comments on the
NUMBER_OF_PROCESSORS proposal.  You had two suggestions:

>>[a] Using DIM=0 to convey rank information is one of those
>>clever-but-strange encoding tricks.  . . . . .

Our original proposal had behind it a principle of parsimony;  we were
at that time attempting to make the *minimal* semantic change to
Fortran 90.  As a result we had *one* statement, the FORALL construct,
and *one* intrinsic, the one for NUMBER_OF_PROCESSORS.  Hence the (I
agree with the description) "clever-but-strange encoding trick."  An
alternative principle, which I am actually much more comfortable with,
is that the language should say what it actually means.  As a result I
agree with your suggestion to add the system inquiry intrinsic
PROCESSOR_SHAPE, as you described, and drop the DIM=0 form of the
NUMBER_OF_PROCESSORS intrinsic.

>>[b] Perhaps NUMBER_OF_PROCESSORS and PROCESSORS_SHAPE should take
>>another optional argument, the name of a processors arrangement
>>as declared in a PROCESSORS directive . . . . .

On the other hand, I am against mixing the directives world with the
Fortran 90 world.  I believe we should keep directives as directives
and give them only pragmatic meanings and not give them semantic
meanings.  Being able to use the name of a processors arrangement in
Fortran 90 code would violate this, and would seem to be pushing hard
for "directive things" to be first class objects.

If the user provides a PROCESSORS directive, the user clearly knows at
program construction time the number of processors and processors shape
for that directive. The values are, presumably, constants, or
parameters, or other forms of restricted expressions.  Thus a user
could use the same constants, or parameters, or other forms of
restricted expressions in Fortran 90 text, without the need for intrinsic functions.

On the other hand, a user should, of course, be able to use the
intrinsics NUMBER_OF_PROCESSORS and PROCESSORS_SHAPE in directives, such as 

 !HPF$ PROCESSORS FOO(NUMBER_OF_PROCESSORS())

---

From: Guy Steele <[email-masked]>
Date: Wed, 13 May 92 10:11:32 EDT

Date: Wed, 13 May 92 05:27:37 PDT
   From: David Loveman <[email-masked]>
   Apparently-To: [email-masked], [email-masked]
   ...

Okay.  I am quite sympathetic to this position.

-Guy