On Mon, Aug 11, 2008 at 09:39:41PM -0700, Alan Irwin wrote: > On 2008-08-11 22:09+0100 Andrew Ross wrote: > > > > > I've been testing the fortran examples using a rather old version of > > ifort (8.1) on 64-bit linux. In order to get the examples to compile and > > run I encountered two issues > > > > 1) Example 20 requires the -assume byterecl flag to ifort in order to > > get byte length records. Otherwise reading lena.pgm fails with an error. > > This is in accord with the comment in the example. > > > > 2) Example 21 requires the -O0 flag, otherwise the compiler optimises > > away the test (x.ne.x) in the function myisnan. > > > > For 1) it would be nice to automatically add this option if ifort is > > detected. For 2) the flag to turn off optimisation is a bit of a fix. > > ifort does have an isnan intrinsic (along with many other compilers) > > which we could use instead. This requires some extra cmake logic though. > > > > Any suggestions? > > (1) Normally, I believe it should be the user's responsibility to set the > flags appropriate for their compiler. > > So what happens if you simply use > > FC='ifort -assume byterecl' > > ? > > If that works for all examples without messing them up, then perhaps we > should recommend that ifort option in the wiki along with an explanation > that example 20 requires byte-length records. That seems simpler to me than > detecting ifort and fooling around with a special compile option for example > 20 for that compiler. However, I don't feel strongly about it so do what > you think is best.
I think you are probably right. The other option is to try and come up with a way of reading in lena.pgm which is not dependent on the record length. > > (2) I think your idea of detecting whether the isnan intrinsic is available > is a good one since -O0 does seem like a workaround. Most of the work is > already done using the CheckFortranFunctionExists.cmake file for CMake-2.6.0 > (which I know about since I wrote the first version of it for the FreeEOS > project). For now, we can simply copy that file from CMake-2.6.0 modules to > our cmake/modules directory so that those with 2.4.8 can still use PLplot. I agree this is a much better solution. On the TODO list, unless anyone else gets there first. Andrew ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel