From: Hazen B. <hba...@ma...> - 2015-05-12 13:17:46
|
On 05/11/2015 06:05 PM, Alan W. Irwin wrote: > On 2015-05-11 16:23-0400 Hazen Babcock wrote: >> >> Much time passes during which I never implement this branch as >> promised, and it looks like some more floating point exceptions have >> crept in. More specifically I'm seeing floating point exceptions in >> x25, x30 and x33. The problem seems to be with plgradient() when it >> uses a software fallback gradient (I was testing with the xwin driver). >> >> You can pull a branch with floating point exception trapping enabled >> for these examples here: >> https://github.com/HazenBabcock/PLplot/tree/fpe_x25_x30_x33 >> >> The problem is occurring in notcrossed() in plfill.c at line 2040 when >> converting from a PLFLT to a PLINT. It looks like fxintersect and >> fyintersect can take on values that are too large to be converted to >> integers. Checking for this fixes the problem, but maybe this is >> indicating some problem upstream? > > Hi Hazen: > > I am glad to hear you have created a topic branch that catches > floating point exceptions. However, I am not keen on pulling a PLplot > topic branch from github for the reasons discussed in > README.developers. So could you either share your topic branch using > "git format-patch" or else just push it to our official repo yourself? > The former is preferred if the work is incomplete (i.e., does not > include a cmake option to control when the PLPLOT_ENABLE_FLOAT_EXCEPT > macro is #defined). Furthermore, if the work is incomplete, I can > finish the cmake aspects of it as promised above and amend your commit > accordingly. > > Once we have implemented an option to check for floating-point > exceptions, then that means any of us should be able to confirm the > ones you have found and find others in the future due to the continued > evolution of our examples. And, of course, this option should allow > us to fix those floating-point exceptions as time permits. Hi Alan, Sorry, that branch was not meant for incorporation into PLplot which is why I did not follow accepted protocols. I thought it might make it easier for others to see the floating point exception problem for these 3 examples. I think we can enable floating point exception trapping more easily using the -ffpe-trap option provided by gfortran. This won't require us to mark up all of our C examples, though we might instead need to check that the fortran compiler is gfortran? https://gcc.gnu.org/onlinedocs/gfortran/Debugging-Options.html -ffpe-trap=invalid,zero,overflow,underflow Compiling PLplot with this fortran flag (CMAKE_Fortran_FLAGS) "worked" for me in that it core dumps on the fortran equivalents of the C examples I mentioned above. I've attached my CMakeCache.txt file. -Hazen |