<div dir="ltr"><div>Dear all,</div><div><br></div><div>Thank you all for your suggestions and for guiding me to the right directions.</div><div> I was able to solve the problem of segmentation fault in w2w.</div><div>It seems like this problem is not reproducible in all the platforms as verified by Prof. Rubel.</div><div><br></div><div>If you encounter such a problem, please apply the following patch for modules_rc.F file located in the SRC_w2w directory:</div><div><br></div><div>434c434,435<br><   complex(C16) :: projection(inwf%bmax-inwf%bmin+1, inwf%Nproj, num_kpts)<br>---<br>>   ! making the projection array dynamic solved the seg fault<br>>   complex(C16), allocatable :: projection(:,:,:)<br>448a450,452<br>>     <br>>   allocate(projection(Nb,inwf%Nproj, num_kpts))<br>> <br>661a666,668<br>>   !deallocate projection array<br>>   deallocate(projection)<br>> <br></div><div><br></div><div>i.e. please make the projection array dynamic.</div><div><br></div><div>Thank you.</div><div><br></div><div>Sincerely,<br></div><div>Niraj Aryal</div><div>Research Associate</div><div>Brookhaven National Lab.</div><div>Upton, NY<br></div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 12, 2020 at 5:15 PM Laurence Marks <<a href="mailto:laurence.marks@gmail.com">laurence.marks@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)">...please add -g ... (not -f, a typo).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 12, 2020 at 11:26 AM Laurence Marks <<a href="mailto:laurence.marks@gmail.com" target="_blank">laurence.marks@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)">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:</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)">  Nb = inwf%bmax-inwf%bmin+1<br>  write(*,*) Nb, inwf%Nproj, num_kpts<br>  projection = 0<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(0,0,0)">I suspect that num_kpts is wrong, so the dimensions of projection are incorrect. However, segmentation errors can be hard to locate.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 12, 2020 at 10:20 AM Niraj Aryal <<a href="mailto:debonairniraj@gmail.com" target="_blank">debonairniraj@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thank you all for your suggestions. <br></div><div>I tried your suggestions but so far, the problem remains.<br></div><div><br></div><div>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 (<a href="mailto:aryalniraj7@gmail.com" target="_blank">aryalniraj7@gmail.com</a>).</div><div>To simplify, I was able to reproduce the problem for paramagnetic case without spin orbit case.<br></div><div><br></div><div>Prof. Marks, I have -traceback option in my compilation.</div><div>These are the line numbers where the seg fault occurs:</div><div><br></div><div>w2w                0000000000432427  l2amn_m_mp_l2amn_         449  modules_rc.F<br>w2w                000000000042D68E  MAIN__                    245  main.f</div><div><br></div><div>This made me believe that the problem is in modules_rc.F file in the amn routine.<br></div><div><br></div><div>Thank you for the patch link Gavin. <br></div><div>I applied modules_rc.patch but the problem persists.</div><div><br></div><div>I will continue trying to solve this problem. I will keep you updated if something new comes up.</div><div>I look forward to your suggestions and feedback.<br></div><div><br></div><div>Sincerely,</div><div>Niraj Aryal<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 8:08 PM Gavin Abo <<a href="mailto:gsabo@crimson.ua.edu" target="_blank">gsabo@crimson.ua.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p><font face="Times New Roman">Not sure if it is related, but are
        you using the w2w fix that Jindrich previously posted for WIEN2k
        19.2 [ 
<a href="https://urldefense.com/v3/__https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg19849.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4RW9V9_w$" target="_blank">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg19849.html</a>
        ] .  Or modules_rc.patch and modules_rc_wplot.patch related to
        w2web if you prefer to try them are at:</font></p>
    <p><font face="Times New Roman"><a href="https://urldefense.com/v3/__https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5C93rS3g$" target="_blank">https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2</a><br>
      </font></p>
    <div>On 9/11/2020 12:02 PM, Niraj Aryal
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Dear w2w experts and developers,</div>
        <div><br>
        </div>
        <div>I am using Wien2k version 19.2 in scientific linux 7.5
          using intel compilers (2018).</div>
        <div><br>
        </div>
        <div>I am trying to wannierize f-electron system with
          antiferromagnetic magnetic ordering using w2w version 2.0 in
          the presence of SOC.</div>
        <div><br>
        </div>
        <div>After self-consistent calculations, these are the steps I
          am following for the wannierisation:</div>
        <div><br>
        </div>
        <div>init_w2w (to write case.klist, case.inwf, case.win etc)</div>
        <div><br>
        </div>
        <div> x lapw1 -up -p<br>
           x lapw1 -dn -p<br>
           x lapwso -up -orb -p</div>
        <div><br>
        </div>
        <div>x w2w -so -up -p  --> segmentation fault here<br>
        </div>
        <div>x w2w -so -dn -p  --> segmentation fault here<br>
        </div>
        <div>..........</div>
        <div><br>
        </div>
        <div>Everything works perfectly if I use small kmesh (about 100
          kpoints) for the wannierisation.</div>
        <div>I have about 50 bands to wannierize. <br>
        </div>
        <div>When I increase the number of kpoints, w2w crashes giving
          segmentation fault.</div>
        <div><br>
        </div>
        <div>I found that w2w can write case.mmn and case.eig with no
          problems but the seg fault occurred while writing case.amn.</div>
        <div>I confirmed the following hoping that it could help in the
          debugging process:</div>
        <div><br>
        </div>
        <div>1) If I decrease the number of bands to wannierize, the
          number of kpoints in the wannierisation can be slightly
          increased without seg fault.<br>
        </div>
        <div>2)The problem persists without -so and -p (i.e. without
          parallel calculation) flag.<br>
        </div>
        <div><br>
        </div>
        <div>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.</div>
        <div>This was confirmed by doing calculations in a simpler
          system like silicon with a large number of kpoints and bands.</div>
        <div><br>
        </div>
        <div>I tried looking into the w2w source files and found few
          hard coded values.</div>
        <div>However, I am hesitant to make changes because I am worried
          this could ruin other things.</div>
        <div><br>
        </div>
        <div>
          <div>This problem is similar to the one posted last year:<br>
          </div>
          <div><a href="https://urldefense.com/v3/__https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18896.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5PBIFcNQ$" target="_blank">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18896.html</a></div>
          <div>which was not solved.<br>
          </div>
        </div>
        <div>I would greatly appreciate your suggestion/feedback
          regarding this problem. </div>
        <div>You could also guide me to the right subroutines if you
          know the details of the code.</div>
        <div><br>
        </div>
        <div>Thank you.</div>
        <div><br>
        </div>
        <div>Sincerely,</div>
        <div>Niraj Aryal</div>
        <div>Research Associate</div>
        <div>Brookhaven National Lab.</div>
        <div>Upton, NY<br>
        </div>
      </div>
    </blockquote>
    <blockquote type="cite"></blockquote>
  </div>

_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="https://urldefense.com/v3/__http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5yrFFN7w$" rel="noreferrer" target="_blank">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a><br>
SEARCH the MAILING-LIST at:  <a href="https://urldefense.com/v3/__http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4XtfMmcA$" rel="noreferrer" target="_blank">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a><br>
</blockquote></div>
_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="https://urldefense.com/v3/__http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5yrFFN7w$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_5yrFFN7w$</a> <br>
SEARCH the MAILING-LIST at:  <a href="https://urldefense.com/v3/__http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4XtfMmcA$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!FFIAVc_c4ngUm39TDyFbeI-PXrGkFarvmCfJ7574Kmic-1Y7CJ5QmYsaGUcau_4XtfMmcA$</a> <br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Professor Laurence Marks<br>Department of Materials Science and Engineering<br>Northwestern University<br><a href="http://www.numis.northwestern.edu/" target="_blank">www.numis.northwestern.edu</a><div>Corrosion in 4D: <a href="http://www.numis.northwestern.edu/MURI" target="_blank">www.numis.northwestern.edu/MURI</a><br>Co-Editor, Acta Cryst A<br>"Research is to see what everybody else has seen, and to think what nobody else has thought"<br>Albert Szent-Gyorgi</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Professor Laurence Marks<br>Department of Materials Science and Engineering<br>Northwestern University<br><a href="http://www.numis.northwestern.edu/" target="_blank">www.numis.northwestern.edu</a><div>Corrosion in 4D: <a href="http://www.numis.northwestern.edu/MURI" target="_blank">www.numis.northwestern.edu/MURI</a><br>Co-Editor, Acta Cryst A<br>"Research is to see what everybody else has seen, and to think what nobody else has thought"<br>Albert Szent-Gyorgi</div></div></div>
_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien" rel="noreferrer" target="_blank">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a><br>
SEARCH the MAILING-LIST at:  <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html" rel="noreferrer" target="_blank">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a><br>
</blockquote></div>