<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>The XMCD calculations seem to be seriously broken in WIEN2k
      17.1.  I suspect that any structure will run into an XMCD error
      similar to:</p>
    <p>username@computername:~/wiendata/testXMCD$ x optic -so -up<br>
       emin,emax,nbvalmax  -5.00000000000000       
      3.00000000000000             9999<br>
       XMCD selected for atom           1 L23<br>
       LSO=  T<br>
      forrtl: severe (174): SIGSEGV, segmentation fault occurred<br>
      Image              PC        Routine            Line       
      Source             <br>
      opticc             0804AAE8  atpar_                    114 
      atpar_op.f<br>
      opticc             0806CA77  cor_mat_                  340 
      sph-UPcor_tmp.f<br>
      opticc             0805799A  MAIN__                    476 
      opmain.f<br>
      opticc             08049CB7  Unknown               Unknown 
      Unknown<br>
      libc.so.6          55664AF3  Unknown               Unknown 
      Unknown<br>
      0.0u 0.0s 0:00.02 100.0% 0+0k 0+72io 0pf+0w<br>
      error: command   /home/gavin/WIEN2k/opticc upoptic.def   failed<br>
    </p>
    <p>The problem seems to be from unallocated variables in
      SRC_optic/sph-UPcor.frc.  What I did was copy some of the allocate
      variable lines from the sph-UP.frc (normal optic routine) to the
      sph-UPcor.frc (XMCD routine).  The sph-UP.frc does not have
      deallocate statements but sph-UPcor.frc has deallocate statements
      at the end of the file.  So I also put deallocate statements for
      each of the allocated variables that were added. My patch file for
      that called sph-UPcor.patch is available at the link below.  The
      program completes without the above error when the patch is
      applied:<br>
    </p>
    <p>username@computername:~/wiendata/testXMCD$ cd $WIENROOT/SRC_optic<br>
      username@computername:~/WIEN2k/SRC_optic$ wget
<a class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/sph-UPcor.patch">https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/sph-UPcor.patch</a><br>
      ...<br>
      username@computername:~/WIEN2k/SRC_optic$ patch -b sph-UPcor.frc
      sph-UPcor.patch <br>
      patching file sph-UPcor.frc<br>
      username@computername:~/WIEN2k/SRC_optic$ cd ..<br>
      username@computername:~/WIEN2k$ ./siteconfig<br>
      ...<br>
        Selection: R<br>
      ...<br>
        Selection: S<br>
         Which program to recompile? optic<br>
      ...<br>
      Compile time errors (if any) were:<br>
      <br>
      Check file   compile.msg   in the corresponding SRC_* directory
      for the <br>
      compilation log and more info on any compilation problem.<br>
      <br>
           Press RETURN to continue<br>
      ...<br>
        Selection: Q<br>
      username@computername:~/WIEN2k$ cd ~/wiendata/testXMCD<br>
      username@computername:~/wiendata/testXMCD$ x optic -so -up
      emin,emax,nbvalmax  -5.00000000000000       
      3.00000000000000             9999<br>
       XMCD selected for atom           1 L23<br>
       LSO=  T<br>
       OPTIC END<br>
      107.8u 0.5s 1:48.50 99.8% 0+0k 0+10512io 0pf+0w<br>
    </p>
    <p>For example, WIEN2k 14.2 used a "LOGICAL   loor(0:lomax)" on line
      58 in sph-UPcor.frc.  So I believe the XMCD calculations worked in
      14.2 but likely broke starting in 16.1 when it seems a switch was
      made to use "allocate (loor(0:lomax,1:nloat_max))" instead but it
      seems the line did not make it into the file.<br>
    </p>
    <p>However, if someone has a completed a XMCD calculation from a
      past WIEN2k version when it was working, it would help if they
      could check and confirm if when the sph-UPcor.patch is applied it
      gives the same or similar XMCD results.<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 3/5/2018 12:32 AM, Jyoti Thakur
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOQ62=Y7C-0-T--u2o5_H1YETOJUs1zpr0SHmAgN3JL6hLjUng@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div class="gmail_quote"><br type="attribution">
            <div dir="ltr">
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>Respected Sir<br>
                            <br>
                          </div>
                          <div>I am trying to run the XMCD calculations
                            for simple case of bcc Fe. I saw in WIEN2k
                            mailing list  related to XMCD problems;</div>
                          <div><a
href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg07677.html"
                              target="_blank" moz-do-not-send="true">https://www.mail-archive.com/w<wbr>ien@zeus.theochem.tuwien.ac.at<wbr>/msg07677.html</a>
                            <br>
                          </div>
                          I have followed these steps:<br>
                        </div>
                        1) runsp_lapw -p<br>
                      </div>
                      2) runsp_lapw -so -p after initso_lapw with 001
                      direction and reduced symmetry<br>
                    </div>
                    3) edit fe.in2, fe.inc as per UG instructions<br>
                  </div>
                  4) cp fe.struct fe.ksym & xkgen -so with large
                  kmesh<br>
                </div>
                5) x lapw1 -up/dn -p, x lapwso -up -p, x lapw2 -fermi
                -up -so -p, x lcore -up/dn -p<br>
                <br>
              </div>
              <div>after that if I run the optic command without XMCD
                then it run successfully & fe.symmatup files get
                generated. <br>
                <br>
              </div>
              <div>But if I add XMCD 1 L23 line to fe.inop then run the
                x optic -up -p command: optic crashed (as given below)
                and fe.symmatup, fe.symmat1up and fe.symmat2up remains
                empty.<br>
                <br>
                <br>
                x optic -up  -p<br>
                running OPTIC in parallel mode<br>
                [1] 12025<br>
                [1]  + Done                   ( cd $PWD; $t $exe
                ${def}_${loop}.def; rm -f .lock_$lockfile[$p] )
                >>  ...<br>
                [1] 12030<br>
                [1]  + Done                   ( cd $PWD; $t $exe
                ${def}_${loop}.def; rm -f .lock_$lockfile[$p] )
                >>  ...<br>
                [1] 12035<br>
                [1]  + Done                   ( cd $PWD; $t $exe
                ${def}_${loop}.def; rm -f .lock_$lockfile[$p] )
                >>  ...<br>
                [1] 12040<br>
                [1]  + Done                   ( cd $PWD; $t $exe
                ${def}_${loop}.def; rm -f .lock_$lockfile[$p] )
                >>  ...<br>
                **  OPTIC crashed!<br>
                0.0u 0.0s 0:00.72 8.3% 0+0k 0+496io 0pf+0w<br>
                error: command   /home/manish/program/WIEN17/op<wbr>ticpara
                -up upoptic.def   failed<br>
                <br>
                <br>
                <br>
              </div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>x optic -up -so -p<br>
                            running OPTIC in parallel mode<br>
                            [1] 7382<br>
                            forrtl: severe (174): SIGSEGV, segmentation
                            fault occurred<br>
                            Image              PC               
                            Routine            Line       
                            Source             <br>
                            opticc             0000000000403B82 
                            atpar_                    111  atpar_op.f<br>
                            opticc             000000000044438C 
                            cor_mat_                  340 
                            sph-UPcor_tmp.f<br>
                            opticc             000000000041C00F 
                            MAIN__                    476  opmain.f<br>
                            opticc             000000000040291C 
                            Unknown               Unknown  Unknown<br>
                            libc.so.6          0000149870F95830 
                            Unknown               Unknown  Unknown<br>
                            opticc             0000000000402809 
                            Unknown               Unknown  Unknown<br>
                            [1]  + Done                   ( cd $PWD; $t
                            $exe ${def}_${loop}.def; rm -f
                            .lock_$lockfile[$p] ) >>  ...<br>
                            [1] 7388<br>
                            forrtl: severe (174): SIGSEGV, segmentation
                            fault occurred<br>
                            Image              PC               
                            Routine            Line       
                            Source             <br>
                            opticc             0000000000403B82 
                            atpar_                    111  atpar_op.f<br>
                            opticc             000000000044438C 
                            cor_mat_                  340 
                            sph-UPcor_tmp.f<br>
                            opticc             000000000041C00F 
                            MAIN__                    476  opmain.f<br>
                            opticc             000000000040291C 
                            Unknown               Unknown  Unknown<br>
                            libc.so.6          0000148CE9CC1830 
                            Unknown               Unknown  Unknown<br>
                            opticc             0000000000402809 
                            Unknown               Unknown  Unknown<br>
                            [1]  + Done                   ( cd $PWD; $t
                            $exe ${def}_${loop}.def; rm -f
                            .lock_$lockfile[$p] ) >>  ...<br>
                            [1] 7394<br>
                            forrtl: severe (174): SIGSEGV, segmentation
                            fault occurred<br>
                            Image              PC               
                            Routine            Line       
                            Source             <br>
                            opticc             0000000000403B82 
                            atpar_                    111  atpar_op.f<br>
                            opticc             000000000044438C 
                            cor_mat_                  340 
                            sph-UPcor_tmp.f<br>
                            opticc             000000000041C00F 
                            MAIN__                    476  opmain.f<br>
                            opticc             000000000040291C 
                            Unknown               Unknown  Unknown<br>
                            libc.so.6          00001499C8207830 
                            Unknown               Unknown  Unknown<br>
                            opticc             0000000000402809 
                            Unknown               Unknown  Unknown<br>
                            [1]  + Done                   ( cd $PWD; $t
                            $exe ${def}_${loop}.def; rm -f
                            .lock_$lockfile[$p] ) >>  ...<br>
                            [1] 7400<br>
                            forrtl: severe (174): SIGSEGV, segmentation
                            fault occurred<br>
                            Image              PC               
                            Routine            Line       
                            Source             <br>
                            opticc             0000000000403B82 
                            atpar_                    111  atpar_op.f<br>
                            opticc             000000000044438C 
                            cor_mat_                  340 
                            sph-UPcor_tmp.f<br>
                            opticc             000000000041C00F 
                            MAIN__                    476  opmain.f<br>
                            opticc             000000000040291C 
                            Unknown               Unknown  Unknown<br>
                            libc.so.6          0000146C94AC0830 
                            Unknown               Unknown  Unknown<br>
                            opticc             0000000000402809 
                            Unknown               Unknown  Unknown<br>
                            [1]  + Done                   ( cd $PWD; $t
                            $exe ${def}_${loop}.def; rm -f
                            .lock_$lockfile[$p] ) >>  ...<br>
                            **  <b>OPTIC crashed!</b><br>
                            0.0u 0.0s 0:00.83 10.8% 0+0k 0+712io 0pf+0w<br>
                            error: command  
                            /home/manish/program/WIEN17/op<wbr>ticcpara
                            -up -c -so upoptic.def   failed<br>
                            <br>
                            <div>
                              <div>Please help me to resolve this
                                problem. <br>
                              </div>
                              <div>Thanks in advance!!!!<span
                                  class="HOEnZb"><font color="#888888"><br
                                      clear="all">
                                  </font></span></div>
                              <span class="HOEnZb"><font color="#888888">
                                  <div>
                                    <div><br>
                                      -- <br>
                                      <div
                                        class="m_-5549988125729493667m_-4557550023788866266gmail_signature">
                                        <div dir="ltr">
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>
                                                    <div>warm regards:<br>
                                                      <br>
....................<br>
                                                    </div>
                                                    Priti Rani<br>
                                                  </div>
                                                  Junior Research Fellow<br>
                                                </div>
                                                DST-EMR Project<br>
                                              </div>
                                              Department of Physics<br>
                                            </div>
                                            Kurukshetra University<br>
                                          </div>
                                          Kurukshetra-136119<br>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </font></span></div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>