[Wien] ACML and gfortran strange segfaults

Martin Kroeker martin at ruby.chemie.uni-freiburg.de
Wed Sep 8 17:54:35 CEST 2010


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.

-- 
Dr. Martin Kroeker            martin at ruby.chemie.uni-freiburg.de
c/o Prof.Dr. Caroline Roehr
Institut fuer Anorganische und Analytische Chemie der Universitaet Freiburg



More information about the Wien mailing list