[Wien] lapwso segfault

Peter Blaha peter.blaha at tuwien.ac.at
Mon Nov 20 18:32:57 CET 2023


Hi,

Such segfaults have been reported before and I also had this in one or 
two cases. As far as I know, it is not well reproducible, seems to 
depend on the computer and in particular on the specific input. Changing 
emax a bit, already makes lapwso running again.

A couple of years ago I had such a case and it was fixed by a 10 times 
larger workspace for routine ZHEEVR  (see comments in hmsec.F a few 
lines before 836).
....
! segfault in zheevr, fixed by larger workspace, PB 25.10.19 CH32SnTe3
       LWORK = WORK(1) *10 !4
       LIWORK = IWORK(1)
       LRWORK=RWORK(1)
....

I concluded at that time that it is a problem with Intels mkl library.

Maybe also multiply liwork and lrwork by 10 and/or use another (bigger) 
factor.


Since you seem to have the problem also in connection with 
OMP_NUM_THREADS (this is new for me), maybe setting a larger stacksize 
helps.

       call KMP_SET_STACKSIZE_S(100000000)   (somewhere at the beginning 
of lapwso)

One could also test it with gfortran/openblas and see if the problem 
persists or my conclusion about a mkl error is correct.

Sorry, but I'm afraid I do not know a perfect solution.

Peter Blaha

Am 20.11.2023 um 15:20 schrieb Mikhail Nestoklon via Wien:
> Dear wien2k community,
> I am trying to check the convergence of problem with respect to Emax 
> and the problem fails starting Emax~=8.5 (strained InP, 2 atoms in 
> elementary cell) with segfault for lapwso.
> WIEN2k version is 23.2. Intel OneAPI 21 (ifort (IFORT) 2021.11.0 20231010).
> The problem occurs in memory allocation, mostly in line 836 of 
> hmsec.F, sometimes in lines 843 or 1185 of same file, deallocation of 
> work arrays. lwork is really small and I have plenty of memory on my 
> system.
> The issue seems to have something with the OMP parallelization. The 
> segfault occurs only when the code is run with 6 threads or more. Since 
> I have two Xeon E5-2697 v3 on this machine, I would love to use at least 
> 8 threads.
> Maybe someone has suggestions how to trace/fix this issue?
> Thank you in advance.
> Sincerely yours,
> Mikhail Nestoklon
> 
> _______________________________________________
> 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

-- 
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300
Email: peter.blaha at tuwien.ac.at    WIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at
-------------------------------------------------------------------------


More information about the Wien mailing list