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.
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.
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.
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
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?
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.
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.