[Wien] Error in MKL 2024.2 during NMR integration
Fecher, Gerhard
fecher at uni-mainz.de
Fri Oct 31 09:03:12 CET 2025
Just to mention:
Parameter 3 was incorrect on entry to DGEBAL means that
the array transferred from dgeev to dgebal had (or produced) NANs
In integrate_current.F this is the array tmptens
if it isn't changed somewhere in dgeev before the call of dgebal, in that case the NANs will not be easily found.
You can use the lapack function disnan to check if it contains NANs before the call to dgeev
I couldn't find disnan directly in the mkl and never checked it
the lapack code is on:
https://www.netlib.org/lapack/explore-html/df/da6/disnan_8f_source.html
https://www.netlib.org/lapack/explore-html/d9/d07/dlaisnan_8f_source.html
which could also be combined to a single function, or some subroutine for debugging.
Some simple debug code for an n x m (here 3x3) array may be
n=3
m=3
do i=1,n
do j=1,m
if ( disnan(a(i,j) ) stop 'array has NANs'
end do
end do
if interested, one could also print which elements are NANs
Ciao
Gerhard
DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."
====================================
Dr. Gerhard H. Fecher
Institut of Physics
Johannes Gutenberg - University
55099 Mainz
________________________________________
Von: Wien [wien-bounces at zeus.theochem.tuwien.ac.at] im Auftrag von Fecher, Gerhard [fecher at uni-mainz.de]
Gesendet: Donnerstag, 30. Oktober 2025 21:36
An: A Mailing list for WIEN2k users
Betreff: Re: [Wien] Error in MKL 2024.2 during NMR integration
Both, dgeev and dgebal are lapack routines,
Did you try to use the original routines from netlib.org ? Or any other precompiled versions found in the linux distributions instead of mkl ?
Ciao
Gerhard
DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."
====================================
Dr. Gerhard H. Fecher
Institut of Physics
Johannes Gutenberg - University
55099 Mainz
________________________________________
Von: Wien [wien-bounces at zeus.theochem.tuwien.ac.at] im Auftrag von Michael Fechtelkord via Wien [wien at zeus.theochem.tuwien.ac.at]
Gesendet: Donnerstag, 30. Oktober 2025 18:52
An: A Mailing list for WIEN2k users
Cc: Michael Fechtelkord
Betreff: Re: [Wien] Error in MKL 2024.2 during NMR integration
Thanks Peter for your help!
I tried both I changed it from 12 to 24 and also to 100. The error
remains and recompiled the nmr module of WIEN2k. Intel oneMKL ERROR:
Parameter 3 was incorrect on entry to DGEBAL. But the referring to DGEEV
is now missing (INFO of DGEEV in integrate_current.f -1
DGEEV in integrate_current.f) does not show up anymore.
Best regards,
Michael
Am 30.10.2025 um 17:16 schrieb Peter Blaha:
> Just a short analysis:
>
> in integrate_current.f some 3x3 matrix is set up and diagonalized in
> dgeev.
>
> I guess Intel may violate the dimensions of the WORK vector (some
> empty working space for this subroutine), which in the doku has a
> value of 4*N, i.e. 12
> This is what we supply.
> I remember that we had some problems with some mkl diagonalization in
> lapwso at some point, which we fixed by larger work-arrays than
> "necessary".
>
> So if you want to try to fix it, I'd change 2 lines in
> integrate_current.f:
>
>
> real*8 :: WR(3),WI(3),VL(3,3),VR(3,3),work(12)
> and
> call
> dgeev('N','V',3,tmptens,3,WR,WI,VL,3,VR,3,work,12,info)
>
> to
> real*8 :: WR(3),WI(3),VL(3,3),VR(3,3),work(24)
> and
> call
> dgeev('N','V',3,tmptens,3,WR,WI,VL,3,VR,3,work,24,info)
>
> 24 is just a guess. Since this is tiny anyway, you can also put 100 or
> so.
>
> Regards
> Peter
>
> Am 30.10.2025 um 14:46 schrieb Michael Fechtelkord via Wien:
>> The origin of the problem is in integrate_current.f
>>
>>
>> calling DGEEV .. and it happens currently only for the nmr
>> calculation of analcime.. (currently using MKL 2025.3 and ifx, gcc
>> 15.2.1)
>>
>>
>> Regards,
>>
>> Michael
>>
>>
>> EXECUTING: mpirun -np 4 -machinefile .machine_nmrinteg
>> /usr/local/ WIEN2k/nmr_mpi -case Analcime_NaAlSi2O6H2O -mode integ
>> -green
>>
>>
>> Intel oneMKL ERROR: Parameter 3 was incorrect on entry to DGEBAL.
>>
>> ..
>>
>> Intel oneMKL ERROR: Parameter 3 was incorrect on entry to DGEBAL.
>> INFO of DGEEV in integrate_current.f -1
>> DGEEV in integrate_current.f
>>
>> ===================================================================================
>>
>> = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
>> = RANK 1 PID 3335 RUNNING AT localhost
>> = KILLED BY SIGNAL: 9 (Killed)
>> ===================================================================================
>>
>>
>>
>> Am 24.09.2025 um 11:59 schrieb Peter Blaha:
>>> Hard to help.
>>> The subroutine dgebal is not called directly by the nmr program of
>>> wien2k.
>>>
>>>
>>>
>>> Am 23.09.2025 um 17:07 schrieb Michael Fechtelkord via Wien:
>>>> Hello all,
>>>>
>>>>
>>>> I experienced an error during executing integratin of the NMR
>>>> Current due to the Intel MKL library. I use ifort 2024.2, MKL
>>>> 2024.2, gcc 15 15.2 and LINUX Kernel 6.16.7-1 for open Suse
>>>> Tumbleweed. Integration was done in sequential mode. Parallel still
>>>> does not work because of the glibc error.
>>>>
>>>>
>>>> EXECUTING: /usr/local/WIEN2k/nmr -case Analcime_NaAlSi2O6H2O -
>>>> mode integ -green
>>>>
>>>>
>>>> Intel oneMKL ERROR: Parameter 3 was incorrect on entry to DGEBAL.
>>>> forrtl: severe (174): SIGSEGV, segmentation fault occurred
>>>> forrtl: severe (174): SIGSEGV, segmentation fault occurred
>>>>
>>>> stop error
>>>>
>>>>
>>>> Has someone an idea how to fix it?
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Michael
>>>>
>>>>
>>>>
>>>
>
--
Dr. Michael Fechtelkord
Institut für Geowissenschaften
Ruhr-Universität Bochum
Universitätsstr. 150
D-44780 Bochum
Phone: +49 (234) 32-24380
Fax: +49 (234) 32-04380
Email: Michael.Fechtelkord at ruhr-uni-bochum.de
Web Page:
https://www.ruhr-uni-bochum.de/kristallographie/kc/mitarbeiter/fechtelkord/
_______________________________________________
Wien mailing list
Wien at 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
_______________________________________________
Wien mailing list
Wien at 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
More information about the Wien
mailing list