[Wien] ACML and gfortran strange segfaults

Peter Blaha pblaha at theochem.tuwien.ac.at
Thu Sep 9 07:25:30 CEST 2010


Sorry. I just looked up the code in my current version, and there 
everything is fine.
However, the distributed WIEN2k version contains the problem of

dosold1=0.d0

and this statement should be moved into the if block after allocation of 
dosold1.

Am 08.09.2010 17:54, schrieb Martin Kroeker:
> Sorry, we have beed bitten by this as well and somehow I did not get around
> to reporting it in time. The issue at least in tetra's ados.f is that the memory
> allocation for "dosold1" is inside an "if (rxesw)" conditional, but its
> initialization to zero at line 53 is not, hence accessing unallocated
> address space.
>
> Effectively, you are relying on the optiming capability of the compiler to
> create separate execution paths for the "rxesw" and "rxes" cases and drop
> the then-unused dosold1 array from the non-rxesw,non-rxes path. gfortran
> apparently does not do this (at least with default optimization flags).
>
> Changing line 53 to
> if (rxesw .or. rxes) then
>    dosold1 = 0.d0
> endif
>
> fixed the problem for us.
>

-- 
Peter Blaha
Inst.Materialchemie, TU Wien
Getreidemarkt 9
A-1060 Vienna
Austria


More information about the Wien mailing list