On 2016-05-09 15:09-0000 Wadud Miah wrote: > The NAG Fortran compiler has picked up a compilation error which I am > struggling to understand: > > Error: > /home/wadud/builds/plplot-plplot/bindings/f95/included_plplot_real_interfaces.f90, > line 1112: Cannot IMPORT PLCGRID because it does not exist in the host > INTERFACE_PLFCONT > detected at ,@PLCGRID > > Going to the offending line in the code shown in boldface: > > subroutine transform( x, y, tx, ty, data ) bind(c) > import :: private_plflt, PLcGrid > implicit none > real(kind=private_plflt), value, intent(in) :: x, y > real(kind=private_plflt), intent(out) :: tx, ty > type(PLcGrid), intent(in) :: data > end subroutine transform >
> It is not complaining about importing private_plflt but is complaining about importing PLcGrid and I do not understand how the compiler should know it should get this type definition from plplot_small_modules.f90 even though this works with other compilers, e.g. gfortran. I don't really know if this is significant, but at least I would like to make sense of it. Hi Wadud: Thanks very much for your build test of PLplot using the NAG Fortran compiler. To help you navigate through our code that is relevant to the above build error for the NAG Fortran compiler, both plplot_double.f90 (which defines the plplot_double module) and plplot_single.f90 (which defines the plplot_single module), contain the line use plplot_types, only: private_plflt, private_plint, private_plbool, private_double, PLcGrid, PLfGrid before they include "included_plplot_real_interfaces.f90". Furthermore, if you look in plplot_small_modules.f90 where the plplot_types module is defined it is straightforward to confirm that module contains both private_plflt and PLcGRID. So my opinion is the above import :: private_plflt, PLcGrid should "just work" for compilers that are compliant with the Fortran 2003 standard. To investigate further why the above logic unexpectedly cannot be compiled with the NAG compiler, I strongly suggest you make a small one-file example containing a simplified plplot_types module that just defines private_plflt, and plcGrid exactly like we do, and which also contains another module that includes the above subroutine transform. Then if that vastly simplified example also fails to compile you have that example to take to the NAG developers concerning a possible bug in their compiler. Or they may respond to your report by saying something like this: "to get that Fortran standards compliant code to compile with the NAG compiler, you need xxx flag". Good luck with your further investigation of the above build error, and let us know how it goes. 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 __________________________ ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel