Hello,
I recently upgraded my Intel tools suite from Intel Composer 2020.1.216 to OneAPI 2021.1.1.
I modified the compilation parameters/options of my program to use the Intel compiler 19.2, to use OneAPI dal includes and to link to OneAPI dal libs.
When I try to compile and link my program I now get an error: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in ReproducerDaal.obj
Ok, it means that the daal libs have been compiled with /MT but mines are compiled with /MD option.
Did you change that? Are you now building daal's .lib with /MT instead of /MD option?
It's weird because I do not have the same behavior with MKL lib...
I provide you a reproducer in attachment:
You will notice that with Composer ReproducerDaal.cpp compiles and links fine with both options /MT or /MD (weird!). With OneApi the compilation fails with the /MD option.
My config: Visual 2019, Windows 10 64bit.
Thanks in advance for your advice,
Guillaume A.
Link Copied
Hi Guillaume,
Yes, since one of betas of oneAPI, oneDAL changed an approach for building library package for Microsoft Windows, and at the moment oneDAL does not provide binaries with both static and dynamic linkages with C/C++ run-time library. It's known problem and oneDAL team investigates possible solutions. I suggest you following options:
1. Use DAAL instead of oneDAL. DAAL supports both static and dynamic linkage with C/C++ runtime library for single binary package of DAAL.
or
2. Build oneDAL by yourself from sources (https://github.com/oneapi-src/oneDAL) and manually change linking with C/C++ runtimes in the makefile (https://github.com/oneapi-src/oneDAL/blob/master/makefile). See https://github.com/oneapi-src/oneDAL/blob/master/INSTALL.md for details about building oneDAL from sources.
Michael.
Hi,
Thanks for reaching out to us.
As this issue is more related to DAL we are moving this issue to the Intel® oneAPI Data Analytics Library & Intel® Data Analytics Acceleration Library forum.
Warm Regards,
Abhishek
Hi,
We have informed the SME about this.We will get back to you on this shortly.
Regards,
Janani Chandran
Hi Guillaume,
Yes, since one of betas of oneAPI, oneDAL changed an approach for building library package for Microsoft Windows, and at the moment oneDAL does not provide binaries with both static and dynamic linkages with C/C++ run-time library. It's known problem and oneDAL team investigates possible solutions. I suggest you following options:
1. Use DAAL instead of oneDAL. DAAL supports both static and dynamic linkage with C/C++ runtime library for single binary package of DAAL.
or
2. Build oneDAL by yourself from sources (https://github.com/oneapi-src/oneDAL) and manually change linking with C/C++ runtimes in the makefile (https://github.com/oneapi-src/oneDAL/blob/master/makefile). See https://github.com/oneapi-src/oneDAL/blob/master/INSTALL.md for details about building oneDAL from sources.
Michael.
Hi Michael, tanks for your reply.
First option (Use DAAL instead of oneDAL) means to be stuck in 2020...
For the moment I will consider the second option: Build oneDAL by myself.
It will be great if the next releases of oneDAL could provide binaries with both static and dynamic linkages.
Regards,
Guillaume A.
Hi,
Did the solution provided help?Can we close the case?
Regards,
Janani Chandran
Yes it is fine to me.
Regards,
Guillaume A.
Hi,
Thanks for the confirmation .We would discontinue monitoring this issue. Please raise a new thread if you have any further issues.
Regards,
Janani Chandran
For more complete information about compiler optimizations, see our Optimization Notice.