Hi Arjen:

Can you comment on what should be done with size calls in our Fortran
code?  Typically, such calls are used in, e.g.,

call plshade07(z, size(z,1), size(z,2), ...

where the sized arguments map to PLINT C types.  So being absolutely
rigourous about this, those size calls should be coerced into returning
a kind=plint result.  For Fortran 2003 (according to the gfortran
documentation) an optional 3rd kind argument was introduced for the size
function to do such coercions on the the kind of integer that was output
by size.  So the case above and similar calls could be changed to

call plshade07(z, size(z,1,plint), size(z,2,plint), ...

One might argue that surely such an absolutely trivial extension that
is blessed as part of the Fortran 2003 standard should now be part of
all Fortran compilers a decade after that standard was adopted.
However, I surveyed some documention for various fortran compilers for
whether an optional 3rd kind argument was supported for size, and the
results were ambiguous.

"info gfortran" says yes for gfortran.
<http://polyphys-s01.ethz.ch/MK/ifort.pdf> says yes for ifort.
<http://www.absoft.com/literature/Fortran%20Reference.pdf> says no
for absoft, but I don't know how current that documentation is.
An old version of pgifortref.pdf that I had downloaded from the
Portland Group in 2006 (!) documented size as not having a 3rd
argument.  However, the modern version of that same documentation at
http://www.pgroup.com/resources/docs.htm has unfortunately been dumbed
down so it doesn't document size at all and similarly for the other
useless modern versions of manuals collected there!

So the score so far is gfortran and ifort yes, absoft maybe not, and
portland group completely unknown due to bad documentation.  Do you
have additional information for whether absoft, portland group, or any
other fortran compilers support the 3rd optional kind argument to
size?

Based on my evidence and anything else you can come up with, let me
know what you decide is the best strategy to use here, and I will
implement this third argument to size or not following whatever you
decide is right for now.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to