Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
338 Views

Debug version of DAAL library linked with TBB

Hello,

I have downloaded DAAL 2020.1.216 tool for Windows from Intel website and installed it under C:\Program Files (x86)\IntelSWTools.

I have an application that uses DAAL in parallel mode with dynamic link, TBB (version 2020.0.166) for vc14 with dynamic link and that is built with Visual Studio. I manage to correctly build and run my application in release mode, that is I can link my application with daal_core.dll, daal_thread.dll, tbb.dll and tbb_malloc.dll and run it fine. However, I am not able to run my application in debug mode, because DAAL libraries link to release version of tbb/tbbmalloc, and not to tbb_debug.dll/tbbmalloc_debug.dll as expected.

I have looked around into this forum and into Intel DAAL documentation but I can't find any reference to a debug version of DAAL libraries nor any suggestion to how to solve my problem. Using a release version of DAAL and TBB both in release and debug configuration of Visual Studio project isn't a solution, because I use other libraries that links to tbb_debug.dll in debug configuration.

Does a version of DAAL library that uses debug version of TBB exists? If not, is it a specific requirement or just a mistake? How can I solve my problem?

Thanks to everyone.

Tags (1)
0 Kudos
14 Replies
Highlighted
Moderator
338 Views

Hi,

Thanks for reaching out.

We need few details to test from our side.Could you provide us the application details and commands used ?

0 Kudos
Highlighted
338 Views

Assuming Intel DAAL is installed under "C:\Program Files (x86)\IntelSWTools" just look for pca_svd_dense_batch example project which can be found under "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\daal\examples\cpp\vcproj\pca_svd_dense_batch\pca_svd_dense_batch.vcxproj".
Open it with Visual Studio and build it for x64 platform with "Debug.dynamic.threaded" configuration.
Copy "daal_core.dll" and "daal_thread.dll" from "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\redist\intel64_win\daal" to project's debug output dir.
Copy "tbb_debug.dll" and "tbbmalloc_debug.dll" from "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\redist\intel64_win\tbb\vc_mt" to project's debug output dir.
Now run the project and it should fail loading DAAL libraries, prompting the following message:

Intel DAAL FATAL ERROR: Cannot find/load library daal_sequential.dll.
Intel DAAL FATAL ERROR: Cannot load neither libdaal_thread.dll nor libdaal_sequential.dll.
Intel DAAL FATAL ERROR: Cannot find/load library daal_sequential.dll.
Intel DAAL FATAL ERROR: Cannot load neither libdaal_thread.dll nor libdaal_sequential.dll.

This happens because "daal_thread.dll" has "tbb.dll" and "tbbmalloc.dll" as depencencies (as shown from dependes.exe), but with debug configuration I need to use "tbb_debug.dll" and "tbbmalloc_debug.dll" as I do with other Intel libraries.

0 Kudos
Highlighted
Moderator
338 Views

Hi,

Thanks for the update.

Has this issue been resolved?Do you need any help from the expert?

0 Kudos
Highlighted
338 Views

Hi,

No it is still open. I'm looking for a version of daal_thread.dll that carries tbb_debug.dll instead of tbb.dll.

If it exists can you provide it? If not, is it in plan for future release?

Thanks

0 Kudos
Highlighted
338 Views

Hello!

could you try to rename tbb_debug.dll/bbmalloc_debug.dll to tbb.dllbbmalloc.dll aftter copying to debug output dir?

Andrey

0 Kudos
Highlighted
338 Views

Unfortunately it won't work, because in the same application I have other libraries that has tbb_debug.dll as dependency.

Moreover, carrying both tbb.dll and tbb_debug.dll will lead to undefined behaviors.

0 Kudos
Highlighted
338 Views

Hello!

could you try to rename copy tbb_debug.dll/bbmalloc_debug.dll to tbb.dllbbmalloc.dll after copying to debug output dir?

Andrey

0 Kudos
Highlighted
338 Views

Andrey Gilev (Intel) wrote:

could you try to rename copy tbb_debug.dll/bbmalloc_debug.dll to tbb.dllbbmalloc.dll after copying to debug output dir?

Will cause my application to load tbb two times from different files. First my application will load tbb_debug.dll, then daal_thread.dll will load tbb.dll, leading to undefined behaviors.

I need to use only tbb_debug.dll for its debugging features and because I'm in a debug configuration and this should be the expected behavior.

0 Kudos
Highlighted
338 Views

> Will cause my application to load tbb two times from different files. First my application will load tbb_debug.dll, then daal_thread.dll will load tbb.dll, leading to undefined behaviors.

I understand how it works. I can`t understand which undefined behavior do you mean. Yes, you will have two copies of the "same" library in the memory, but you should be able to do debug.

I don`t try to propose it as solution, but as workaround to quickly solve your problem. Actually, DAAL doesn`t provide debug libraries.

Andrey

0 Kudos
Highlighted
338 Views

If I remember correctly visual studio runtime handles a mix of release and debug in proper way if there is no cross boundary memory management. So there might might be oversubscription because of 2 instances of TBB which is not critical for the debug config, but there shouldn't be UB.

cheers,
Vladimir 

0 Kudos
Highlighted
338 Views

Hello,

Thanks everyone for answering and for your help, I'll try Andrey workaround for now.

greetings

0 Kudos
Highlighted
Moderator
333 Views

Hi,

Has this issue been resolved?Could you give us an update?


0 Kudos
Highlighted
324 Views

Hello,

Yes the issue has been resolved, can be closed.

Thanks

0 Kudos
Highlighted
Moderator
321 Views

Hi,

Thanks for the confirmation,we are closing the case.


0 Kudos