Community
cancel
Showing results for 
Search instead for 
Did you mean: 
gennadii_mog
Beginner
83 Views

Difference between static and dynamic libraries usage

Hello everyone,

Can anybody tell me what difference between usage static or dynamic IPP libraries (from performance point of view).

Currently I am using static libraries. But I cannot set the number of threads in the multithreading
environment (ippSetNumThreads returns ippStsNoOperation).

I understand that this function is not supported in static version of libraries (even if I added openmp support).

Thanks,

Gennadii

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
83 Views

Gennadii,

1) with the practical point , the are no big performance difference ( if any) between static or dynamic linking with IPP.

2) you cannot set the number of treads multithreading environment because of you linked non-threaded static libs. If you want to use the Intel IPP functions threaded with the OpenMP*, you need to link to
ipp*emerged.lib, ipp*merged_t.lib, ippsemerged.lib, ippsmerged_t.lib, ippcore_t.lib, and libiomp5mt.lib.

then, as an example, the code

int numThr = 2;
st = ippSetNumThreads(numThr);
printf("%d : %s\n", st, ippGetStatusString(st));

return

0 : ippStsNoErr: No error, it's OK

--Gennady
gennadii_mog
Beginner
83 Views

Gennady,

I am using mac version of IPP libraries that is why I don't have these libraries (I have theirs mac analoug). But I don't have libiomp5mt. Only libiomp.

Can you please tell me where I can get it?

I am using libiomp5 and libguide.

Thanks, Gennadii

gennadii_mog
Beginner
83 Views

Gennady,

Your answer very helped me. Now ippSetNumThreads returns ippStsNoErr.

But I have another question:

When I changed the number of threads in ippSetNumThreads then I don't see any threads count changes in System Monitor.

Can you explain why it so? And what should I do for fixing this item?

Thanks, Gennadii

Gennady_F_Intel
Moderator
83 Views

There are several reasons caused such behavior. One of them. for example, may be your workload is very insignificantly. For example, look at you that will display when the dynamic linking..

--Gennady

Reply