[Wien] Possible bug in recent version of nn?

Peter Blaha pblaha at theochem.tuwien.ac.at
Fri Aug 6 15:50:52 CEST 2021


Hi,

I can confirm the problem (only with gfortran, does not appear with 
ifort). There is an uninitialized variable iz, which in a write 
statement could cause a problem (if not set to zero).
Fortunately the problem occurs only for single atoms in huge unit cells 
and with gfortran.

Fix: search in SRC_nn/nn.f    for
       allocate ( JRJN(index),icnt(index,mshell,48*2),iz(index,mshell) )
and initialize iz with zero afterwards:
       iz=0

Thanks for the report.

Peter Blaha

Am 06.08.2021 um 13:28 schrieb SM Alay-e-Abbas:
> Dear WIEN2k mailing list,
> 
> 
> While computing atomic energies using a large fcc cell (→ 
> http://www.wien2k.at/reg_user/faq/cohesive_energies.html 
> <http://www.wien2k.at/reg_user/faq/cohesive_energies.html>) with WIEN2k 
> 21, I have encountered the following during the execution of the nn 
> program:
> 
> ------------------------------------------------------------------------------------------------------------------------
> 
> Program received signal SIGSEGV: Segmentation fault - invalid memory 
> reference.
> 
> 
> Backtrace for this error:
> 
> #0 0x15425d0e132a
> 
> #1 0x15425d0e0503
> 
> #2 0x15425c97603f
> 
> #3 0x15425d2627f8
> 
> #4 0x15425d263bca
> 
> #5 0x15425d25b07c
> 
> #6 0x15425d25b6dc
> 
> #7 0x55d75388641a
> 
> #8 0x55d753881fbe
> 
> #9 0x15425c958bf6
> 
> #10 0x55d753881fe9
> 
> #11 0xffffffffffffffff
> 
> Segmentation fault (core dumped)
> 
> 0.019u 0.000s 0:03.11 0.3% 0+0k 0+24io 0pf+0w
> 
> error: command /home/WIEN2k/nn nn.def failed
> 
> stop error
> 
> 
> This only happens for cell parameters greater than 15.5 Bohr (or NN-DIST 
> _>_ 11 Bohrs). Replacing the current nn program with an older version 
> solves the problem for me. Is there a bug in the recent version of nn?
> 
> 
> Best Regards,
> 
> 
> Alay-e-Abbas
> 
> 
> _______________________________________________
> 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             FAX: +43-1-58801-165982
Email: blaha at theochem.tuwien.ac.at    WIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at
-------------------------------------------------------------------------


More information about the Wien mailing list