- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I detected an issue related to Loading and Unloading steps for Waterfall DLLs ( Instruction Set specific ).
Let's say I've compiled an application ( 64-bit / Dynamic linking of IPP libraries ) that could work on CPUs that support AVX Instruction Set ( code e9 for Waterfall DLLs ). A test case starts with a call to ippInit function in main function:
[ Source codes ]
...
int main()
{
ippInit();
...
}
...
However, before ippInit was called I was able to see in VS debugger that ippie9-7.1.dll and ippse9-7.1.dll already loaded ( see lines (4) and (5) ). Now, take a look at a VS debugger output:
[ VS Output Window ]
...
(0)'IccTestApp64D.exe': Loaded '..\x64\Debug\IccTestApp64D.exe', ...
...
(1)'IccTestApp64D.exe': Loaded '..\x64\ippcore-7.1.dll', ...
(2)'IccTestApp64D.exe': Loaded '..\x64\ippi-7.1.dll', ...
(3)'IccTestApp64D.exe': Loaded '..\x64\ipps-7.1.dll', ...
...
(4)'IccTestApp64D.exe': Loaded '..\x64\ippie9-7.1.dll', ...
(5)'IccTestApp64D.exe': Loaded '..\x64\ippse9-7.1.dll', ...
...
...Note: main() called
...
...Note: ippInit() called
...
(6)'IccTestApp64D.exe': Unloaded '..\x64\ippie9-7.1.dll'
(7)'IccTestApp64D.exe': Loaded '..\x64\ippie9-7.1.dll', ...
(8)'IccTestApp64D.exe': Unloaded '..\x64\ippse9-7.1.dll'
(9)'IccTestApp64D.exe': Loaded '..\x64\ippse9-7.1.dll', ...
...
processing continues...
As you can see as soon as ippInit is called both DLLs are unloaded and than loaded again ( see lines (6), (7), (8) and (9) ). Please take a look and investigate if something is wrong.
Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey, what is the purpose of calling Init() for dynamic linking? - initialization is done in dllmain().
Anyway you are right - we'll check how to avoid re-loading for reinitialization to the same state (in your case - default).
regards, Igor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually when some dll is loaded and unloaded there could be issue related to different versions of the same dynamic library conflicts when the location is resolved and loaded from different paths.It could be also case of reinitialization when the code referenced from ippInit() is loaded from those two dlls.The recommended method for troubleshooting such a issues(for advanced users) is to enable in gflags.exe "show loader snaps" option and monitor the NtLoader process when it is called for loading various referrenced dlls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Igor,
does ippInit() reference code located in ippie7.1.dll and ippie9-7.1.dll?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, it is a bug, will be fixed in the next major release. ippInit() is called from each "stub" dll in dllmain function. When you call ippInit from your app - it doesn't check already registered/loaded dlls and restarts warterfall procedure - so corresponding check will be added.
regards, Igor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey, here is the # of the issue - DPD200332902 for your reference. when the problem will be fixed we will inform you asap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
who knows how old it is... to aswer this question we need to check all versions starting from the first one - IPP 2.0.Guess now it doesn't matter as they can't be fixed. So let's wait for the next one - fixed one...
regards, Igor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
this is normal situation for IPP dynamic dispatcher. A developer can manage optimization variant by ippInitCpu() function, a developer can put only part of IPP DLLs in his package, etc. So every time when ippInit() or ippInitCpu() is called all IPP DLL's are unloaded and appropriate optimization veriats are loaded.
I agree it is possible to make the dispatcher more smart and without unnecessary reloading, but IPP DLL's are deprecated in IPP 8.0 at all. Much better to use IPP static libraries or build own custom DLL (small size and contains only necessary functionality instead of many huge size IPP DLLs)
Pavel

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page