Subject: Number of Processors

From: Rob Schreiber <[email-masked]>
Date: Thu, 7 May 92 09:44:27 PDT

Peter Highnam sent this to me some time ago:

	The subroutine/distribute group, meeting on the second
	day of the April committee meeting worried that the
	properties of N$PROC may not match those of any other
	F90 entity.  The matter was pushed to the intrinsics group
	for resolution.  I've appended a list of points for discussion.

	a. This entity provides the maximum number of processors
	   ("processor" is currently an implementation-dependent term) over
	   which a template can be distributed.  The value of the 
	   entity is not necessarily known at compilation.  It is,
	   naturally, positive-integer-valued. This is the definition from 
	   the Align and Distribute Proposal that GLS prepared, dated 4/22/92.

	b. Is it an intrinsic function or an "environment variable"?
	   The latter term doesn't seem to have any standing in F90,
	   which would make it an intrinsic function...

It seems quite like the inquiry functions PRECISION, RADIX, RANGE.  These
return values dependent on the machine that the code runs on and are not
defined at compile time.   They are restricted expressions.

	c. This entity can be used in places where a constant is generally
	   required, such as array declarations, parameter statements, .. 
	   even though it is not necessarily known until runtime.  Can F90
	   intrinsics be used this way ?  If not, what are our options ?

Yes, they can.   As an integer, scalar valued restricted expression, it
becomes a specification expression, so it can be used in bounds in 
array declarations, etc.

	d. The entity can optionally be defined at compilation (e.g., 
	   compile-line flag).  This would provide a compiler
	   with more info for optimization purposes.

But should have no semantic efect, and should not change the places where
it is allowed to include places where only constants are valid.

	e. Naming conventions.  "$" is a legal character (even in
	   F77) but not in variable names.  The "N$PROC" label was
	   simply inherited from an early proposal (Fortran D?) and
	   has the singular advantage of not interfering with the
	   programmer's name space (she cannot use a "$" in a name).
	   Retain this form ?  Change ?

I don't see any reason to introduce a $ into this.   NUMBER_OF_PROCESSORS
is better.

I also propose that this be part of the "minimum subset".   That forces
31 character names into the MS as well!

---   Rob