From: Arjen M. <Arj...@de...> - 2017-04-18 07:05:38
|
Hi Alan, Hm, I will have to look into this a bit closer - this week is a trifle crowded though, so it will take me some time to get around to it. I agree, as per your later post (got caught by the spam filter for reasons best known to itself), that "f95" is not the correct keyword anymore. So that is indeed another thing to do. Perhaps I should consult the gfortran mailing list about the details. Regards, Arjen > -----Original Message----- > From: Alan W. Irwin [mailto:ir...@be...] > Sent: Saturday, April 15, 2017 5:55 AM > To: Arjen Markus; PLplot development list > Subject: Fortran standard compliance checking does not work for gfortran > > Hi Arjen: > > I had to rework (commit 58dc757) the suggestion in README.developers about the > recommended gfortran compiler options because the prior suggestion > > export FFLAGS='-std=f95 -O3 -fall-intrinsics -fvisibility=hidden -pedantic -Wall - > Wextra' > > did not work with our new fortran binding. > > (As an aside, in my tests I dropped -fvisibility=hidden because I believe that makes > no sense for Fortran code. I also dropped -fall-intrinsics since I prefer using > Wintrinsics-std which is automatically deployed with -Wall if -fall-intrinsics is not > specified.) So here are the actual flags I tried. > > 1. export FFLAGS='-O3 -std=f95 -pedantic -Wall -Wextra' > > Those options generated a build error (as expected) because the Fortran 95 > standard does not include support for the ISO_C_BINDING module that we use to > implement the new fortran binding. > > 2. export FFLAGS='-O3 -std=f2003 -pedantic -Wall -Wextra' > > Those options generated the following type of build error: > > included_plplot_real_interfaces.f90:2601.25: > Included at > /home/software/plplot/HEAD/plplot.git/bindings/f95/plplot_double.f90:117: > > c_loc(plotentries), size(plotentries, kind=private_plint) ) > 1 > Error: Fortran 2008: Array of interoperable type at (1) to C_LOC which is > nonallocatable and neither assumed size nor explicit size > > for what I consider to be a spurious reason (see the revised README.developers > for further discussion). > > 3. export FFLAGS='-O3 -std=f2008 -pedantic -Wall -Wextra' > > got rid of the above type of error message, but also generated a whole new set of > build errors. > > 4. export FFLAGS='-O3 -Wall -Wextra' > > does work without any build errors so this is now what I recommend in > README.developers. > > To summarize, if you discovered a standards-compliant change to our new Fortran > binding implementation that would allow use of > > export FFLAGS='-O3 -std=f2003 -pedantic -Wall -Wextra' > > with gfortran, then that would allow our users/developers to at least do minimal > standards compliance checking with gfortran. But if you feel that is too much trouble > and/or the fix would obfuscate our fortran binding code too much simply to quiet a > gfortran build error that is likely spurious, then I am content with the current > recommendation > > export FFLAGS='-O3 -Wall -Wextra' > > Of course, the (significant) downside of the current recommendation is it means our > users/developers cannot check Fortran standards compliance with gfortran and > must rely on NAG instead for such checking. > > 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 > __________________________ DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |