[Wien] Segmentation fault in w2w

Laurence Marks laurence.marks at gmail.com
Sat Sep 12 18:26:12 CEST 2020


Is this compiled with -g ? If not, please add -f, recompile and then
repeat. (The reason is that optimizations can lead to segmentation faults
appearing at an inappropriate location in the code.) If with -g it is still
the same, please add before line 449 of  modules_rc.F a write command, i.e.
so it has:

  Nb = inwf%bmax-inwf%bmin+1
  write(*,*) Nb, inwf%Nproj, num_kpts
  projection = 0

I suspect that num_kpts is wrong, so the dimensions of projection are
incorrect. However, segmentation errors can be hard to locate.

On Sat, Sep 12, 2020 at 10:20 AM Niraj Aryal <debonairniraj at gmail.com>
wrote:

> Thank you all for your suggestions.
> I tried your suggestions but so far, the problem remains.
>
> As per Prof. Rubel's request, I will share with you my struct file
> privately along with the steps. Please watch out for my email (
> aryalniraj7 at gmail.com).
> To simplify, I was able to reproduce the problem for paramagnetic case
> without spin orbit case.
>
> Prof. Marks, I have -traceback option in my compilation.
> These are the line numbers where the seg fault occurs:
>
> w2w                0000000000432427  l2amn_m_mp_l2amn_         449
>  modules_rc.F
> w2w                000000000042D68E  MAIN__                    245  main.f
>
> This made me believe that the problem is in modules_rc.F file in the amn
> routine.
>
> Thank you for the patch link Gavin.
> I applied modules_rc.patch but the problem persists.
>
> I will continue trying to solve this problem. I will keep you updated if
> something new comes up.
> I look forward to your suggestions and feedback.
>
> Sincerely,
> Niraj Aryal
>
> On Fri, Sep 11, 2020 at 8:08 PM Gavin Abo <gsabo at crimson.ua.edu> wrote:
>
>> Not sure if it is related, but are you using the w2w fix that Jindrich
>> previously posted for WIEN2k 19.2 [
>> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg19849.html
>> <https://urldefense.com/v3/__https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg19849.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4RW9V9_w$>
>> ] .  Or modules_rc.patch and modules_rc_wplot.patch related to w2web if you
>> prefer to try them are at:
>>
>> https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2
>> <https://urldefense.com/v3/__https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5C93rS3g$>
>> On 9/11/2020 12:02 PM, Niraj Aryal wrote:
>>
>> Dear w2w experts and developers,
>>
>> I am using Wien2k version 19.2 in scientific linux 7.5 using intel
>> compilers (2018).
>>
>> I am trying to wannierize f-electron system with antiferromagnetic
>> magnetic ordering using w2w version 2.0 in the presence of SOC.
>>
>> After self-consistent calculations, these are the steps I am following
>> for the wannierisation:
>>
>> init_w2w (to write case.klist, case.inwf, case.win etc)
>>
>>  x lapw1 -up -p
>>  x lapw1 -dn -p
>>  x lapwso -up -orb -p
>>
>> x w2w -so -up -p  --> segmentation fault here
>> x w2w -so -dn -p  --> segmentation fault here
>> ..........
>>
>> Everything works perfectly if I use small kmesh (about 100 kpoints) for
>> the wannierisation.
>> I have about 50 bands to wannierize.
>> When I increase the number of kpoints, w2w crashes giving segmentation
>> fault.
>>
>> I found that w2w can write case.mmn and case.eig with no problems but the
>> seg fault occurred while writing case.amn.
>> I confirmed the following hoping that it could help in the debugging
>> process:
>>
>> 1) If I decrease the number of bands to wannierize, the number of kpoints
>> in the wannierisation can be slightly increased without seg fault.
>> 2)The problem persists without -so and -p (i.e. without parallel
>> calculation) flag.
>>
>> In my opinion, there are some hard coded array size value(s) in the w2w
>> program in amn/mmn subroutines which give segmentation fault when the
>> number of projections*bands*kpoints exceeds that value.
>> This was confirmed by doing calculations in a simpler system like silicon
>> with a large number of kpoints and bands.
>>
>> I tried looking into the w2w source files and found few hard coded values.
>> However, I am hesitant to make changes because I am worried this could
>> ruin other things.
>>
>> This problem is similar to the one posted last year:
>> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18896.html
>> <https://urldefense.com/v3/__https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18896.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5PBIFcNQ$>
>> which was not solved.
>> I would greatly appreciate your suggestion/feedback regarding this
>> problem.
>> You could also guide me to the right subroutines if you know the details
>> of the code.
>>
>> Thank you.
>>
>> Sincerely,
>> Niraj Aryal
>> Research Associate
>> Brookhaven National Lab.
>> Upton, NY
>>
>> _______________________________________________
>> Wien mailing list
>> Wien at zeus.theochem.tuwien.ac.at
>> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>> <https://urldefense.com/v3/__http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5yrFFN7w$>
>> SEARCH the MAILING-LIST at:
>> http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>> <https://urldefense.com/v3/__http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4XtfMmcA$>
>>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
>
> https://urldefense.com/v3/__http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5yrFFN7w$
> SEARCH the MAILING-LIST at:
> https://urldefense.com/v3/__http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4XtfMmcA$
>


-- 
Professor Laurence Marks
Department of Materials Science and Engineering
Northwestern University
www.numis.northwestern.edu
Corrosion in 4D: www.numis.northwestern.edu/MURI
Co-Editor, Acta Cryst A
"Research is to see what everybody else has seen, and to think what nobody
else has thought"
Albert Szent-Gyorgi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20200912/ec987494/attachment.htm>


More information about the Wien mailing list