Hello Peter,
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
granulartity:1
*omp_lapw0:8*
omp_global:2
1:localhost
1:localhost
1:localhost
1:localhost
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?
I added a sed command to change the line in .machines. It changes the
.machines file but still seems not to work correctly.
if ( $icycle == 1 ) then
set FC=`grep 'FC =' $WIENROOT/SRC_lapw0/Makefile |cut -d= -f2`
if( "$FC" == "ifx" ) then
set omp_save=$OMP_NUM_THREADS
setenv OMP_NUM_THREADS 1
* set omp=`grep 'omp_lapw0:' .machines |cut -b 11`
sed -i "s/omp_lapw0:$omp/omp_lapw0:1/" .machines*
echo OMP_NUM_THREADS set to 1 >> $dayfile
endif
endif
total_exec lapw0 $dispersion $half $para -vsp ${vsp} ${core_energy}
if ($icycle == 1 && "$FC" == "ifx" ) then
setenv OMP_NUM_THREADS $omp_save
* sed -i "s/omp_lapw0:1/omp_lapw0:$omp/" .machines*
echo OMP_NUM_THREADS set back to $omp_save >> $dayfile
endif
Am 09.07.2025 um 13:58 schrieb Peter Blaha:
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).
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):
....
if ( $icycle == 1 ) then
set FC=`grep 'FC =' $WIENROOT/SRC_lapw0/Makefile |cut -d= -f2`
if( "$FC" == "ifx" ) then
set omp_save=$OMP_NUM_THREADS
setenv OMP_NUM_THREADS 1
echo OMP_NUM_THREADS set to 1 >> $dayfile
endif
endif
total_exec lapw0 $dispersion $half $para -vsp ${vsp}
${core_energy}
if ($icycle == 1 && "$FC" == "ifx" ) then
setenv OMP_NUM_THREADS $omp_save
echo OMP_NUM_THREADS set back to $omp_save >> $dayfile
endif
...
Am 09.07.2025 um 12:29 schrieb Michael Fechtelkord:
I am not really a tcsh script expert, but i would introduce an if ...
else ... instruction into the "run_lapw" script.
like if (cycle =1 and fortran compiler = ifx) then set
OMP_NUM_THREADS for lapw0 = 1
else (cycle > 1) set OMP_NUM_THREADS for lapw0 back to the original
value in .machines ..
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,
any help from the experts who are familiar with the script content
would be appreciated here and the fastest way.
Thanks in advance,
Michael
Gavin Abo
<https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=from:%22Gavin+Abo%22>
Mon, 07 Jul 2025 05:32:05 -0700
<https://www.mail-archive.com/search?l=wien@zeus.theochem.tuwien.ac.at&q=date:20250707>
*Is there any solution to this problem?*
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.
Perhaps you could make a shell script to do that with the file
containing something like:
run_lapw -i 1
export OMP_NUM_THREADS=1
run_lapw -NI
export OMP_NUM_THREADS=8
[1]
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23780.html
*or else Should I go to gfortran/gcc? I have not seen the benchmark
timing of ifx and gfortran in recent times.*
Currently, I don't have any benchmark timing for ifx and gfortran.
It's up to you which compilers you try to use.
*Is there a possible source of getting old ifort ?*
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).
[2]
https://community.intel.com/t5/Blogs/Tech-Innovation/Tools/A-Historic-Moment-for-The-Intel-Fortran-Compiler-Classic-ifort/post/1614625
K
ind Regards,
Gavin WIEN2k user
Am 07.07.2025 um 12:16 schrieb susanta mohanta:
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.
with warm regards
Susanta
On Mon, Jul 7, 2025 at 3:32 PM Michael Fechtelkord
<michael.fechtelk...@ruhr-uni-bochum.de> wrote:
Hello Susanta,
set omp_lapw0:1 in .machines ONLY for the first cycle.
you can do calculate only one cycle by either by using the "-i 1"
in run_lapw or by using "touch .stop"
After running the first cycle you can set back omp_lapw0:8 in
.machines. Then it uses all 8 threads again and should not crash
again. Only the first cycle is senstive to omp threads more than
one.he continiu
Do not forget to use the -NI flag in the continuing cycles to
avoid that the Broyden files are deleted.
Best regards,
Michael
Am 07.07.2025 um 10:58 schrieb susanta mohanta:
Dear Prof. Abo, I have set OMP_NUM_THREADS=1: and it's running
without problem. But by doing so, it is using only one core out
of 8. As mentioned by MIcheal, it only runs without error if one
sets omp_lapw0:1 in .machine file and always crashes if I
increase more than 1. Is there any solution to this problem? or
else Should I go to gfortran/gcc? I have not seen the benchmark
timing of ifx and gfortran in recent times. Is there a possible
source of getting old ifort ?
Thank you for your kind help. Waiting for your reply
with warm regards
Susanta
On Mon, Jul 7, 2025 at 1:45 PM Gavin Abo <gabo13...@gmail.com>
wrote:
When you ran ./userconfig_lapw during installation, if you
set OMP_NUM_THREADS ≥ 2, a solution might be to set
OMP_NUM_THREADS to 1. Unfortunately, there is a known lapw0
issue with using 2 or more OMP_NUM_THREADS when compiling
WIEN2k with the ifx compiler at this time as mentioned in a
previous post to this mailing list at [1].
You could check your ~/.bashrc to see what you had
./userconfig_lapw generate there for OMP_NUM_THREADS.
For example, my ~/.bashrc file has a line with
OMP_NUM_THREADS=1:
username@computername:~$ grep OMP_NUM_THREADS ~/.bashrc
if [ "$OMP_NUM_THREADS" = "" ]; then export
OMP_NUM_THREADS=1; fi
So, if have a value other than 1, you could try editing
~/.bashrc and change it to be OMP_NUM_THREADS=1.
If that doesn't remove the lapw0 error, there may be some
other runtime issue with the lapw0 compiled with ifx for
your particular computer system. In which case, you might
have to use instead other compilers (e.g., gfortran/gcc [2])
to get around the issue.
[1]
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg23752.html
[2]
https://github.com/gsabo/WIEN2k-Docs/blob/main/WIEN2k24.1_Ubuntu24.04.1_Install_with_gfortran.pdf
Kind Regards,
Gavin
WIEN2k usereb Page:
https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/
--
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:michael.fechtelk...@ruhr-uni-bochum.de
Web
Page:https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/
_______________________________________________
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
--
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:michael.fechtelk...@ruhr-uni-bochum.de
Web
Page:https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/
_______________________________________________
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html