[Wien] PES issues

Pavel Ondračka pavel.ondracka at email.cz
Fri Mar 13 11:58:15 CET 2020


Dear Wien2k mailing list,

I'm experiencing a crash when trying to calculate valence band spectra
for VN.

(This is a resend of previous email which is stuck in the queue due to
being slightly over the size limit, now with a link instead. I
apologize for double posting if the original one eventually makes it to
the list as well.)

There is out of bounds write during optimization of q_spheres:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040d494 in optimize_charge () at optimize_charge.f:95
95                 temp(l,recon_counter)=temp(l,j)+temp(l,i)
(gdb) print recon_counter
$1 = 27
(gdb) print output_counter
$2 = 24
(it tries to write at index 27) but the size is just 24 (defined
by output_counter)

The files needed to reproduce this and the terminal output (together
with the manual keyboard input needed to reproduce the crash) are at 
https://drive.google.com/open?id=1NZ8lSkfrgigtdQZrDZLp8Y-mFf4uSyk_ 
. I'm not a regular user of the pes program so there is a high
chance that there is something wrong with my input.

BTW While taking a quick look I spotted some likely unrelated small
issues, for instance pes is also influenced by the well known issue
with gfortran using the units 5 and 6 (have to change it manually to
something else otherwise stdin and stdout doesn't work) and there are
some valgrind warnings even before the crash, for example:

==57304== Conditional jump or move depends on uninitialised value(s)
==57304==    at 0x419919: abs_smooth_ (SPLINE.f:173)
==57304==    by 0x41852E: setup_ (SPLINE.f:91)
==57304==    by 0x4199FE: spline_ (SPLINE.f:16)
==57304==    by 0x41582B: read_database2_ (read_database2.f:124)
==57304==    by 0x403FE7: MAIN__ (pes.f:151)
==57304==    by 0x4066FF: main (pes.f:3)
==57304==  Uninitialised value was created by a stack allocation
==57304==    at 0x4199B3: spline_ (SPLINE.f:1)

SPLINE.f:173
   if (x >= delta_x) then
   
The unuinitialized variable is the delta_x which was passed from setup
(SPLINE.f:91):
call abs_smooth(m4 - m3, delta_x, w1)
and was itself allocated on the stack at the beginning of spline but is
not initialized anywhere as far as I can see. So I set it to 0.0d0 (the
default for ifort).

and one more which should be harmless...
==57389== Conditional jump or move depends on uninitialised value(s)
==57389==    at 0x47213EC5: bcmp (vg_replace_strmem.c:1113)
==57389==    by 0x474A3B7A: _gfortran_compare_string
(string_intrinsics_inc.c:98)
==57389==    by 0x41677F: read_outputst_ (read_outputst.f:37)
==57389==    by 0x4048E2: MAIN__ (pes.f:222)
==57389==    by 0x4066FF: main (pes.f:3)
==57389==  Uninitialised value was created by a stack allocation
==57389==    at 0x416559: read_outputst_ (read_outputst.f:1)

Best regards
Pavel



More information about the Wien mailing list