[Wien] $DEC! NOOPTIMIZE equivalents in gfortran?

Pavel Ondračka pavel.ondracka at email.cz
Thu Aug 9 10:21:01 CEST 2018


I can look at the gfortran, what is your testcase?

I tried to take a quick look with the full mixer using one random TiO2
case. I put a breakpoint after some random Kahan sum (specifically this
was at charge.f:150 in Wien2k 18.2) and I looked for the differences
between O0 and O2. I was actually looking for small differences, but
the value of sum was 0 with -O2 vs 739.29 with -O0!

Hence in this case it looks like either the different optimization
levels influence the program flow, or the optimizations caused the
shift of the breakpoint to some other place.  

It might also be possible that this is a gdb problem since there is a
lot of 
** On entry to DHSEQR parameter number  4 had an illegal value
** On entry to DGEBAL parameter number  3 had an illegal value
** On entry to DGEHRD  parameter number  2 had an illegal value
spam which I have no idea about and <error reading variable ....
(access outside bounds of object referenced via synthetic pointer)>

BTW valgrind is also not happy with the mixer (even at -O0 there are
lot of "Use of uninitialised value ... and On entry to DHSEQR parameter
number  4 had an illegal value )

If you can produce a simple testcase, I'd be happy to look into the
Kahan sum problem, but at the moment I can't reproduce with the full
mixer due to the aforementioned problems.

Best regards
Pavel

Laurence Marks píše v St 08. 08. 2018 v 11:44 -0500:
> I am testing adding the compiler directive !DEC$ NOOPTIMIZE to the
> Kahan summations in charge.f in order to prevent ifort from
> optimizing the summation away. It seems to help.
> 
> Does anyone know if there are equivalents in gfortran or other
> compilers? (I can't find anything for gfortran.)
> 
> N.B., if anyone has experience with directives and wants to suggest
> others that may be faster but will avoid optimizing away the
> summation I am open to suggestions.
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  
> http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html



More information about the Wien mailing list