<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I found the problem.</p>
    <p><br>
    </p>
    <p>I added the instructions at the wrong place (found that out by
      placing "echo "Hallo"" in the run_lapw script to find the correct
      executed lapw0 part). So here is my solution (complete part):</p>
    <p><br>
    </p>
    <p>Look for cont_lapw0: in the script.. and add the bold lines</p>
    <p><br>
    </p>
    <p>cont_lapw0:<br>
      testinput    $file.in0 error_input<br>
      <br>
      <b>if ( $icycle == 1 ) then<br>
           set FC=`grep 'FC =' $WIENROOT/SRC_lapw0/Makefile |cut -d=
        -f2`<br>
           if( "$FC" == "ifx" ) then<br>
             set omp_save=$OMP_NUM_THREADS<br>
             setenv OMP_NUM_THREADS 1<br>
             set omp=`grep 'omp_lapw0:' .machines |cut -b 11`<br>
             sed -i "s/omp_lapw0:$omp/omp_lapw0:1/" .machines<br>
             echo OMP_NUM_THREADS set to 1 >> $dayfile<br>
            endif<br>
        endif<br>
      </b><br>
      <br>
      total_exec    lapw0 $dispersion $half $para $lmbj $minusf
      ${core_energy}<br>
      <br>
      <b>if ($icycle == 1 && "$FC" == "ifx" ) then<br>
           setenv OMP_NUM_THREADS $omp_save<br>
           sed -i "s/omp_lapw0:1/omp_lapw0:$omp/" .machines<br>
           echo OMP_NUM_THREADS set back to $omp_save >> $dayfile<br>
        endif<br>
      </b><br>
    </p>
    <p>Best regards,</p>
    <p>Michael</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 09.07.2025 um 15:52 schrieb Michael
      Fechtelkord:<br>
    </div>
    <blockquote type="cite"
      cite="mid:fd6f271c-7622-44df-8ab9-1b6c1553de45@ruhr-uni-bochum.de">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hello Peter,</p>
      <p><br>
      </p>
      <p>thank you for your quick solution. It does not work for my case
        as I use a special value for lapw0 in my .machines file</p>
      <p>granulartity:1<br>
        <b>omp_lapw0:8</b><br>
        omp_global:2<br>
        1:localhost<br>
        1:localhost<br>
        1:localhost<br>
        1:localhost</p>
      <p>Can I use the instruction to change the value in .machines
        to omp_lapw0:1 in the first circle and then back to omp_lapw0:8
        in the second cycle?</p>
      <p><br>
      </p>
      <p>I added a sed command to change the line in .machines. It
        changes the .machines file but still seems not to work
        correctly.</p>
      <p><br>
      </p>
      <p>if ( $icycle == 1 ) then<br>
           set FC=`grep 'FC =' $WIENROOT/SRC_lapw0/Makefile |cut -d=
        -f2`<br>
           if( "$FC" == "ifx" ) then<br>
             set omp_save=$OMP_NUM_THREADS<br>
             setenv OMP_NUM_THREADS 1<br>
          <b>   set omp=`grep 'omp_lapw0:' .machines |cut -b 11`<br>
               sed -i "s/omp_lapw0:$omp/omp_lapw0:1/" .machines</b><br>
             echo OMP_NUM_THREADS set to 1 >> $dayfile<br>
            endif<br>
        endif<br>
        <br>
        <br>
        total_exec      lapw0   $dispersion $half $para -vsp ${vsp}
        ${core_energy}<br>
        <br>
        if ($icycle == 1 && "$FC" == "ifx" ) then<br>
           setenv OMP_NUM_THREADS $omp_save<br>
        <b>   sed -i "s/omp_lapw0:1/omp_lapw0:$omp/" .machines</b><br>
           echo OMP_NUM_THREADS set back to $omp_save >> $dayfile<br>
        endif</p>
      <p><br>
      </p>
      <p><br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">Am 09.07.2025 um 13:58 schrieb Peter
        Blaha:<br>
      </div>
      <blockquote type="cite"
        cite="mid:5c98b622-1138-4965-947c-a7fd74e93864@tuwien.ac.at">I
        hope there will be a "better" solution with ifx, but at the
        moment this is a possible fix (as I said before, I cannot
        reproduce the problem with my setup). <br>
        <br>
        In run_lapw search for lapw0 until you find the line as listed
        below (there are several lapw0 lines, but they are not relevant
        for PBE calculations): <br>
        <br>
        .... <br>
        <br>
        if ( $icycle == 1 ) then <br>
           set FC=`grep 'FC =' $WIENROOT/SRC_lapw0/Makefile |cut -d=
        -f2` <br>
           if( "$FC" == "ifx" ) then <br>
             set omp_save=$OMP_NUM_THREADS <br>
             setenv OMP_NUM_THREADS 1 <br>
             echo OMP_NUM_THREADS set to 1 >> $dayfile <br>
            endif <br>
        endif <br>
        <br>
        total_exec      lapw0   $dispersion $half $para -vsp ${vsp}
        ${core_energy} <br>
        <br>
        if ($icycle == 1 && "$FC" == "ifx" ) then <br>
           setenv OMP_NUM_THREADS $omp_save <br>
           echo OMP_NUM_THREADS set back to $omp_save >> $dayfile
        <br>
        endif <br>
        ... <br>
        <br>
        <br>
        <br>
        Am 09.07.2025 um 12:29 schrieb Michael Fechtelkord: <br>
        <blockquote type="cite">I am not really a tcsh script expert,
          but i would introduce an if ... else ... instruction into the
          "run_lapw" script. <br>
          <br>
          <br>
          like if (cycle =1 and fortran compiler = ifx) then set
          OMP_NUM_THREADS for lapw0 = 1 <br>
          <br>
          else (cycle > 1) set OMP_NUM_THREADS for lapw0 back to the
          original value in .machines .. <br>
          <br>
          <br>
          That would run in every directory and every case and I think
          it is easy to include. But As the script is huge I did not
          find the variables I need to use, <br>
          <br>
          any help from the experts who are familiar with the script
          content would be appreciated here and the fastest way. <br>
          <br>
          <br>
          Thanks in advance, <br>
          <br>
          Michael <br>
          <br>
          <br>
          <br>
          <blockquote type="cite">Gavin Abo
            <a class="moz-txt-link-rfc2396E"
href="https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=from:%22Gavin+Abo%22"
              moz-do-not-send="true"><https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=from:%22Gavin+Abo%22></a>
            Mon, 07 Jul 2025 05:32:05 -0700
            <a class="moz-txt-link-rfc2396E"
href="https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=date:20250707"
              moz-do-not-send="true"><https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=date:20250707></a><br>
            <br>
            *Is there any solution to this problem?* <br>
            <br>
            As Michael mentioned at [1], you could try running
            OMP_NUM_THREADS=1 for the first cycle and then more threads
            such as  8 (OMP_NUM_THREADS=8) after that. <br>
            <br>
            Perhaps you could make a shell script to do that with the
            file containing something like: <br>
            <br>
            run_lapw -i 1 <br>
            export OMP_NUM_THREADS=1 <br>
            run_lapw -NI <br>
            export OMP_NUM_THREADS=8 <br>
            <br>
            [1]
            <a class="moz-txt-link-freetext"
href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23780.html"
              moz-do-not-send="true">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23780.html</a><br>
            <br>
            *or else Should I go to gfortran/gcc? I have not seen the
            benchmark timing of ifx and gfortran in recent times.* <br>
            <br>
            Currently, I don't have any benchmark timing for ifx and
            gfortran.  It's up to you which compilers you try to use. <br>
            <br>
            *Is there a possible source of getting old ifort ?* <br>
            <br>
            The old ifort versions are likely still downloadable from
            Intel's website.  However, as you should see on the website
            at [2], a paid for and active Priority Support is needed for
            accessing them in the Intel® Registration Center (IRC). <br>
            <br>
            [2]
            <a class="moz-txt-link-freetext"
href="https://community.intel.com/t5/Blogs/Tech-Innovation/Tools/A-Historic-Moment-for-The-Intel-Fortran-Compiler-Classic-ifort/post/1614625"
              moz-do-not-send="true">https://community.intel.com/t5/Blogs/Tech-Innovation/Tools/A-Historic-Moment-for-The-Intel-Fortran-Compiler-Classic-ifort/post/1614625</a><br>
            K <br>
            ind Regards, <br>
            Gavin WIEN2k user <br>
            <br>
            <br>
          </blockquote>
          -- <br>
          Dr. Michael Fechtelkord <br>
          <br>
          Institut für Geologie, Mineralogie und Geophysik <br>
          Ruhr-Universität Bochum <br>
          Universitätsstr. 150 <br>
          D-44780 Bochum <br>
          <br>
          Phone: +49 (234) 32-24380 <br>
          Fax:  +49 (234) 32-04380 <br>
          <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
            href="mailto:Email:Michael.Fechtelkord@ruhr-uni-bochum.de"
            moz-do-not-send="true">Email:Michael.Fechtelkord@ruhr-uni-bochum.de</a>
          <br>
          Web
          Page:<a class="moz-txt-link-freetext"
href="https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/"
            moz-do-not-send="true">https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/</a><br>
          <br>
          <br>
          _______________________________________________ <br>
          Wien mailing list <br>
          <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
            href="mailto:Wien@zeus.theochem.tuwien.ac.at"
            moz-do-not-send="true">Wien@zeus.theochem.tuwien.ac.at</a> <br>
          <a class="moz-txt-link-freetext"
href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien"
            moz-do-not-send="true">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a>
          <br>
          SEARCH the MAILING-LIST at:  <a class="moz-txt-link-freetext"
href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html"
            moz-do-not-send="true">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a>
          <br>
        </blockquote>
        <br>
      </blockquote>
      <pre class="moz-signature" cols="72">-- 
Dr. Michael Fechtelkord

Institut für Geologie, Mineralogie und Geophysik
Ruhr-Universität Bochum
Universitätsstr. 150
D-44780 Bochum

Phone: +49 (234) 32-24380
Fax:  +49 (234) 32-04380
Email: <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
      href="mailto:Michael.Fechtelkord@ruhr-uni-bochum.de"
      moz-do-not-send="true">Michael.Fechtelkord@ruhr-uni-bochum.de</a>
Web Page: <a class="moz-txt-link-freetext"
href="https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/"
      moz-do-not-send="true">https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/</a>
</pre>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
Wien mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Wien@zeus.theochem.tuwien.ac.at">Wien@zeus.theochem.tuwien.ac.at</a>
<a class="moz-txt-link-freetext" href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a>
SEARCH the MAILING-LIST at:  <a class="moz-txt-link-freetext" href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Dr. Michael Fechtelkord

Institut für Geologie, Mineralogie und Geophysik
Ruhr-Universität Bochum
Universitätsstr. 150
D-44780 Bochum

Phone: +49 (234) 32-24380
Fax:  +49 (234) 32-04380
Email: <a class="moz-txt-link-abbreviated" href="mailto:Michael.Fechtelkord@ruhr-uni-bochum.de">Michael.Fechtelkord@ruhr-uni-bochum.de</a>
Web Page: <a class="moz-txt-link-freetext" href="https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/">https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/</a>
</pre>
  </body>
</html>