libgfortran 4.7 and denormals

Cihan Altinay c.altinay@uq.edu.au
Tue Apr 21 04:36:00 GMT 2015


Hi,

I was hoping someone from the gfortran community could give me a hint on 
an issue we are having.

We are developing numerical software (in C++) that has python wrappers 
and we recently noticed a significant drop in runtime performance under 
certain conditions. I was able to narrow it down to a combination of 
denormals being generated at runtime (doubles in the order of 1e-307) 
and a third-party module being loaded that links against libgfortran.

The executable is compiled using -ffast-math (gcc) or -ftz (icc) and the 
denormals are flushed to zero as expected *unless* we load a module that 
links against libgfortran. That suggests that the gfortran library 
somehow resets the processor flag that flushes denormals to zero.

I have now found out that this behaviour is no longer apparent for 
gfortran 4.9 (on debian jessie) but is happening with gfortran 4.7 (SLES 
11.3 and debian wheezy).

Now my question is whether this was a bug in gfortran 4.7 that has been 
fixed upstream, or does it relate to the way gfortran was built by the 
package maintainers? Since we have a compute cluster that runs SLES I 
would like to report this to SUSE so they can provide a "fixed" version 
of the library but I'd like to know if anyone knows more about this 
issue. A search in the bug tracker didn't reveal anything related.

Many thanks,
Cihan



More information about the Fortran mailing list