- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have issue (total loss of precision) when using MKL calling DGESV() to invert a matrix in Fortran 90 on dual Dual core XEON Gold 6248R with 1TB RAM system and compiling for multiple thread execution. For instance if I link my program using the following libraries
..\intel64_win\mkl_intel_lp64.lib
..\intel\intel64_win\mkl_core.lib
..\intel\intel64_win\mkl_tbb_thread_dll.lib
the code would run using all the computer cores and threads (96) and will only produce valid results if the size on the matrix is <7999 elements. At n=8000 the solution would be just noise.
One interesting feature if I use the exact same libraries on a different system with single CPU (ex Intel 13th gen with 64GB Ram) the code would run just fine without any loss of precision for any matrix size.
If instead I link the code on the Dual core XEON Gold 6248R against following library
..\intel\intel64_win\mkl_rt.lib
the code would run using all the physical cores (48) at about 80% of their speed and will produce valid results regardless the size of the matrix but at lower speed since half of the threads aren't used.
Any possible solutions on how to run my code using all the available 96 threads ?
Source code and bat files use for compilation are attached
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MKL uses the physical cores by default. You see the developer guide for more details. If you are interested in using hyperthreads also, then you could set MKL_DYNAMIC environment variables.
Example, the local system, – 40 physycal cores, 80 hyperthreading :
Default behavior: - 40 threads have been used, see the verbose outpus:
MKL_VERBOSE=2 ./a.out 2000
MKL_VERBOSE oneMKL 2024.0 Product build 20231011 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) enabled processors, Lnx 2.40GHz lp64 intel_thread
MKL_VERBOSE DGEMM(N,N,2000,2000,2000,0x7ffd8d611e18,0x14d86a5d4080,2000,0x14d86874f080,2000,0x7ffd8d611e28,0x14d8668ca080,2000) 65.43ms CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:40
And here when we explicitly say MKL to use HT threads as well:
MKL_DYNAMIC=FALSE MKL_VERBOSE=2 ./a.out 2000
MKL_VERBOSE oneMKL 2024.0 Product build 20231011 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) enabled processors, Lnx 2.40GHz lp64 intel_thread
MKL_VERBOSE DGEMM(N,N,2000,2000,2000,0x7ffe77399688,0x1526551d4080,2000,0x15265334f080,2000,0x7ffe77399698,0x1526514ca080,2000) 50.29ms CNR:OFF Dyn:0 FastMM:1 TID:0 NThr:80
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and one more - check the current (latest ) version of MKL ( 2024.0 ) if the DGESV() problem still exists when, as you reported, the problem size >8K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thank you for both replies, to follow your latest comment instead of dealing with the old installation I update my compiler by installing the following :
w_Base_Kit_2024.0.1.45
w_fortran-compiler_p_2024.0.2.27
integrating with visual studio 2022. Initially the integration in visual studio fail, so following other people comments on the forum I downgraded from visual studio 2022.17.8 back to visual studio 2022.0.x.
After that all the installation went well no errors and no complains, but when I start visual studio I get the following message
The 'oneApiPackage' package did not load correctly (see attached picture) so I am wondering what went wrong ?
After that I will try to see if the 8k bug disappear in the new MKL
Thanks
Franco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
please create the new thread to follow with new topic and set the new TAG there . The current topic is resolved.
--Gennady
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page