[Wien] ACML and gfortran strange segfaults

John Rundgren jru at kth.se
Thu Sep 9 13:47:21 CEST 2010


Dear Professor Blaha,
Reading about a couple of bugs lately, I wonder if bug repairs could be
currently published on WIEN2k's home page, for instance, under Known
limitations and bugs. Would be easy to look up.
With best regards,
John Rundgren
KTH

On Thu, 2010-09-09 at 07:25 +0200, Peter Blaha wrote:
> 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.
> >
> 




More information about the Wien mailing list