<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<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"><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"><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">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">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>
Am 07.07.2025 um 12:16 schrieb susanta mohanta:
<br>
<blockquote type="cite">Dear Prof. Michael Fechtelkord, thank
you for your suggestion. I have set lapw0:1 and lapw1:8;
lapw2:8 in .machines and running since lapw0 does not take
much time to complete compared to others but probably your
suggestion is better. Could you please write some patch to
do this automatically, I mean one does not need to stop
after one cycle.
<br>
<br>
with warm regards
<br>
Susanta
<br>
<br>
On Mon, Jul 7, 2025 at 3:32 PM Michael Fechtelkord
<a class="moz-txt-link-rfc2396E" href="mailto:Michael.Fechtelkord@ruhr-uni-bochum.de"><Michael.Fechtelkord@ruhr-uni-bochum.de></a> wrote:
<br>
<br>
Hello Susanta,
<br>
<br>
<br>
set omp_lapw0:1 in .machines ONLY for the first cycle.
<br>
<br>
<br>
you can do calculate only one cycle by either by using
the "-i 1"
<br>
in run_lapw or by using "touch .stop"
<br>
<br>
After running the first cycle you can set
back omp_lapw0:8 in
<br>
.machines. Then it uses all 8 threads again and should
not crash
<br>
again. Only the first cycle is senstive to omp threads
more than
<br>
one.he continiu
<br>
<br>
Do not forget to use the -NI flag in the continuing
cycles to
<br>
avoid that the Broyden files are deleted.
<br>
<br>
Best regards,
<br>
Michael
<br>
<br>
<br>
Am 07.07.2025 um 10:58 schrieb susanta mohanta:
<br>
<blockquote type="cite"> Dear Prof. Abo, I have set
OMP_NUM_THREADS=1: and it's running
<br>
without problem. But by doing so, it is using only one
core out
<br>
of 8. As mentioned by MIcheal, it only runs without
error if one
<br>
sets omp_lapw0:1 in .machine file and always crashes
if I
<br>
increase more than 1. Is there any solution to this
problem? or
<br>
else Should I go to gfortran/gcc? I have not seen the
benchmark
<br>
timing of ifx and gfortran in recent times. Is there
a possible
<br>
source of getting old ifort ?
<br>
<br>
Thank you for your kind help. Waiting for your reply
<br>
with warm regards
<br>
Susanta
<br>
<br>
On Mon, Jul 7, 2025 at 1:45 PM Gavin Abo
<a class="moz-txt-link-rfc2396E" href="mailto:gabo13279@gmail.com"><gabo13279@gmail.com></a>
<br>
wrote:
<br>
<br>
When you ran ./userconfig_lapw during
installation, if you
<br>
set OMP_NUM_THREADS ≥ 2, a solution might be to
set
<br>
OMP_NUM_THREADS to 1. Unfortunately, there is a
known lapw0
<br>
issue with using 2 or more OMP_NUM_THREADS when
compiling
<br>
WIEN2k with the ifx compiler at this time as
mentioned in a
<br>
previous post to this mailing list at [1].
<br>
<br>
You could check your ~/.bashrc to see what you had
<br>
./userconfig_lapw generate there for
OMP_NUM_THREADS.
<br>
<br>
For example, my ~/.bashrc file has a line with
<br>
OMP_NUM_THREADS=1:
<br>
<br>
username@computername:~$ grep OMP_NUM_THREADS
~/.bashrc
<br>
if [ "$OMP_NUM_THREADS" = "" ]; then export
<br>
OMP_NUM_THREADS=1; fi
<br>
<br>
So, if have a value other than 1, you could try
editing
<br>
~/.bashrc and change it to be OMP_NUM_THREADS=1.
<br>
<br>
If that doesn't remove the lapw0 error, there may
be some
<br>
other runtime issue with the lapw0 compiled with
ifx for
<br>
your particular computer system. In which case,
you might
<br>
have to use instead other compilers (e.g.,
gfortran/gcc [2])
<br>
to get around the issue.
<br>
<br>
[1]
<br>
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23752.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23752.html</a><br>
[2]
<br>
<a class="moz-txt-link-freetext" href="https://github.com/gsabo/WIEN2k-Docs/blob/main/WIEN2k24.1_Ubuntu24.04.1_Install_with_gfortran.pdf">https://github.com/gsabo/WIEN2k-Docs/blob/main/WIEN2k24.1_Ubuntu24.04.1_Install_with_gfortran.pdf</a><br>
<br>
Kind Regards,
<br>
<br>
Gavin
<br>
WIEN2k usereb Page:
<br>
<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><br>
<br>
</blockquote>
</blockquote>
</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" href="mailto:Email:Michael.Fechtelkord@ruhr-uni-bochum.de">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/">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" href="mailto:Wien@zeus.theochem.tuwien.ac.at">Wien@zeus.theochem.tuwien.ac.at</a>
<br>
<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>
<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">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" 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>