Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

libguide40.dll and libiomp5md.dll

Ryan2
Beginner
935 Views
Hi,
I've read the forums about this and have yet to find a solution:http://software.intel.com/en-us/articles/openmp-support-change/
I'm writing plugins (dll's) for a host program. I'm using IPP 7.07 with multi-threaded static library. I'm linkinglibiomp5md.lib. The host program is using Intel MKL10.02.019 which links libguide40.dll.
I cannot change what the host program is linking.
While setting an enviroment variable is not a viable option, I've setSET KMP_DUPLICATE_LIB_OK=TRUE for testing purposes. With that variable set, I'm able to load my dll's; however, there is NO threading on any of the IPP functions.
Can someone help me find a solution. Perhaps building my dll's usinglibguide40.dll.
Please help.
0 Kudos
11 Replies
pvonkaenel
New Contributor III
935 Views
Hi Ryan,

This probably is not the solution you want, but I ended up linking against the non-threaded static IPP libraries. If you need threading, I used TBB instead of OpenMP to thread the calling of the IPP routines. I found the additional control over the threading very useful, and at least it seems like TBB and OpenMP play nicely together. I think the down side is you may over subscribe your cores.

PEter
0 Kudos
Ryan2
Beginner
935 Views
Hi Peter,
That sounds interesting. How do I go about using TBB to thread my IPP function calls?
Can you give me a little example?
Best,
Ryan
0 Kudos
Ying_H_Intel
Employee
935 Views
Hi Ryan,

What IPP funciton are you calling in the dll?
Please notes, not all of IPP functions are threaded.

I guessthe belowarticles related to peter's meaning: Insteadto useIPP internal OpenMP threads, you can use TBB threading to add external threads on IPP function.

http://software.intel.com/en-us/articles/openmp-and-the-intel-ipp-library/and
http://software.intel.com/en-us/articles/intel-threading-building-blocks-scalable-programming-for-multi-core/

Best Regards,
Ying
0 Kudos
Ryan2
Beginner
935 Views
Hi Ying,
Thanks or the reply.
I'm mainly usingippiConvValid_32f_C1R and ippiReplicateBorders
I don't see how I can use TBB to threadippiConvValid_32f_C1R. Perhaps I'm missing something.
Best,
Ryan
0 Kudos
pvonkaenel
New Contributor III
935 Views
Hi Ryan,

I was just getting ready to put together a simple TBB class example which demonstrates how to thread IPP, but your conv case is slightly more complicated. I would recommend that you create a regular blocked_range to get image slices insterad of using a 2d blocked range - I've seen this helps with caching. But because you're using conv, you will need to allow for some overlap from slice to slice to make sure you don't get incorrect answers at slice boundaries.

Peter
0 Kudos
Ying_H_Intel
Employee
935 Views
Hi Ryan,

TheippiConvValid_32f_C1R is threading internally by OpenMP, so it require OpenMP dll libiomp5md.dll.
The function ipiReplicatedBorders is not threaded internally. you don't need take care of it.

As you can't upgrade the mkl version,thereleft some solution.
1. back to old IPP version, which use libguide40.dll. It seems don't need extra work, just get older IPP version and rebuild your dll.

2. as Peter suggested, create external threads on IPP function (using serialIPP library, ignoring IPP internal threading). for example, use TBB, which is a kind of new multi-thread c/c++ programing method.It do need extra work. You need learn how to use TBB first fromTBB forum or it's product page.
I happend to seeatry fromone ofuser:
http://software.intel.com/en-us/forums/showthread.php?t=106755&o=a&s=lr.
for your reference

Best Regards,
Ying
0 Kudos
Ryan2
Beginner
935 Views
Thanks Ying!
1) Where do I download old versions? What is the newest version that is still using libguide?
Best,
Ryan
0 Kudos
Chuck_De_Sylva
Beginner
935 Views
There is also some additional information regarding IPP and TBB on this external site:

http://www.drdobbs.com/go-parallel/combining-tbb-and-ipp-with-intel-paralle/223900067

- Chuck
0 Kudos
Ying_H_Intel
Employee
935 Views
Hi Ryan,

I'd likerecommend you to try external thread instead of back to old version:)because some obvious benifits foryour future development work.

The old (newest)version should be IPP 5.3.4, you can submit a request to premier.intel.com to ask the install package.

Best Regards,
Ying
0 Kudos
Ryan2
Beginner
935 Views
Hi Ying,
I will indeed avoid using an old version as I've determined there are features and bug fixes I require in the new Ipp.
I have not seen any example of how to thread ippiConvValid.
Perhaps I'm missing something but it seems to me that TBB is for threading loops. All the examples are just running multiple Ipp calls in parrallel. I need to thread ONE call to ippiConvValid. Is that possible with TBB?
Best,
Ryan
0 Kudos
Ying_H_Intel
Employee
935 Views
Hi Ryan,

Maybe there is some thingmisunderstand about
-external threading or internal threading.
- and multithread method, explict thread or implicit threading .

As you see in the article http://software.intel.com/en-us/articles/openmp-and-the-intel-ipp-library/, the threading IPP function is threaded internally by OpenMP, which use implicit threading (don't create thread explictly.

If extract the internal threading to up-level threading, for example, use TBB or OpenMP on IPP function call. Then the kind of threading we can call external threading, the external threading can be explict or implict.

please see the difference of OpenMP and TBB, window APT: http://software.intel.com/en-us/articles/intel-threading-building-blocks-openmp-or-native-threads/. actually, no, TBB is not for threading loops.


No sure if I understand your correctly about" need to thread ONE call to ippiConvValid". there are three possiblilty:
1) you create multply threads, for example, 4 thread, and one thread is to call ippiConvValid, and the left 3 thread to do other task? Thereby Forming multi-thread application.
In such case, you don't need ippiConvValid internal threading, to link serial library is okippi_l.lib is enough

2)or you thread ONE CALL to ippiConvValid, but still expect ippiConvValid do internal threading. (start mult-threads itself). This is original IPP usage model.

3)use TBB to do external threading, which also don't use explict threading. Just writeONE IPP call in it's parallel structure. as http://software.intel.com/en-us/forums/showthread.php?t=106755. TBB will manage the threads to do ippiConvValid.In this case, it is external threading and the further model we mentioned. So yes, it is possible with TBB.

Best Regards,
Ying
0 Kudos
Reply