On 2016-03-04 07:59-0000 Arjen Markus wrote:

> Hi Alan,
>
>
>
> I have tested the latest version of the Fortran examples on three Windows 
> platforms (all 64-bits but not yet in all details, that is not for all 
> examples I have tried all API variants). For Cygwin and MinGW-w64 I found no 
> problems, but I did for bare Windows with Intel Fortran. I first feared for 
> some obscure bug in the way we deal with callbacks and such, but it turned 
> out to be a feature (or quirk, if you like) of Intel Fortran.
>
>
>
> The Fortran 2003 standard says that allocatable arrays that appear on the 
> left-hand side of an assignment are automatically (re)allocated if necessary. 
> For Intel Fortran this behaviour requires an explicit compiler option 
> (-assume:lhs_realloc). Since this is not included in our build scripts, the 
> examples that use this fail. In my private repository I have added the 
> explicit allocation statements and that gives correct results (at least as 
> far as the my eyes are concerned - I need to formally verify it by comparing 
> output files).
>
>
>
> Anyway, the message at this moment is: the Fortran binding is doing fine on 
> the mentioned platforms and I need to make a few small changes to the 
> examples (the allocate statements and a comment about why they are used).
>
>
>
> Some more extensive tests are required, but things are looking quite good.

Hi Arjen:

I am glad your preliminary Fortran tests are going well on all three
platforms.

For convenient complete testing of Fortran while avoiding additional testing
of other components of PLplot I would recommend running

scripts/comprehensive_test.sh --cmake_added_options "-DDEFAULT_NO_DEVICES=ON 
-DPLD_ps=ON  -DDEFAULT_NO_BINDINGS=ON -DENABLE_f95=ON -DPL_DOUBLE=OFF" 
--do_test_interactive no

on the Cygwin and MinGW-w64/MSYS2 platforms.

In theory, if you take care with your PATH setup (e.g., so that
bash.exe from Cygwin or MinGW-w64/MSYS2 was on your PATH), then that
same script (with the additional options --generator_string "NMake
Makefiles" --build_command nmake) _should_ also work for the MSVC
case. But if you cannot get that script to work on MSVC, then you
should at minimum run all 33 Fortran examples by hand for the MSVC
case to help find all cases where automatic allocation needs to
be replaced by explicit allocation.

Thanks for your heads-up that the Intel compiler does not support
automatic allocation by default.  Probably most/all of those automatic
allocations were introduced by my changes since once I discovered
gfortran supported that Fortran 2003 feature by default, I incorrectly
assumed the other Fortran compilers would as well.  Anyhow, your
solution of using explicit allocations is obviously what should be
done here to work around this Intel compiler deficiency, and I look
forward to your commit to that effect once you find all the instances
of automatic allocations in our Fortran examples.

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
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to