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

Eclipse 3.5 CDT 6.0 IPP 6.1 and Static Lining, Multi-threading, etc. under Linux

jaylord
Beginner
423 Views
Something seems to be serious messed up with the IPP setup for Eclipse. What I'm using:

Eclipse 3.5 Build ID 20100218-1602 with CDT 6
Intel Linux Compiler em64t v11.1-072
SuSe 11.3 64-bit up to date
Core2 Quad cpu

Everything seems setup properly with the setup scripts for the Intel compiler and IPP running on login. My app builds properly using using dynamic linking (C/C++ Build->Settings->Link with Dynamic Libraries checked), but multi-threading won't start. Heres the code:


...
IppStatus sts;
sts = ippInitCpu(ippCpuC2Q);
cout << "Ipp init: " << ippGetStatusString( sts ) << endl;

cout << "Number of cores = " << ippGetNumCoresOnDie() << endl;

int numThreads = 4;
sts = ippSetNumThreads( numThreads );
cout << "Set Num Threads: " << ippGetStatusString( sts ) << endl;
ippGetNumThreads( &numThreads );
cout << "Number of threads = " << numThreads << endl;
...

The linker message:

make -k all
Building target: MXLib.exe
Invoking: Intel Intel 64 C++ Linker
icpc -shared-intel -parallel -ipp=common -mkl=parallel -lpthread -o"MXLib.exe" ./src/MXLib.o
Finished building target: MXLib.exe

And what I get out:

Ipp init: ippStsNoErr: No error, it's OK
Number of cores = 4
Set Num Threads: ippStsNoOperation: No operation has been executed
Number of threads = 1

So, obviously multi-threading is not working. I tried using the static threaded libraries but they defy all effort to link through eclipse. No combination of options anywhere will make the linker inside eclipse have anything to do with it. Just checking the use static libraries box brings up:

make -k all
Building target: MXLib.exe
Invoking: Intel Intel 64 C++ Linker
icpc -static -parallel -ipp=common -mkl=parallel -lpthread -o"MXLib.exe" ./src/MXLib.o
ld: cannot find -lippvmem64t
make: *** [MXLib.exe] Error 1
make: Target `all' not remade because of errors.

Problem is, 'ippvmem64t' doesn't exist. There are 'libippvmemerged64t.a' etc. in the IPP lib folder. Unchecking the use static libraries and adding the libraries manully doesn't work for some reason (Eclipse adding the -l before the library name?).

Anyway, something is definatley messed up, missing from the help docs or I've been drinking too much and it's effecting me during the day. :-)

P.S. I want to do this through the Eclipse interface since this library is for use by non-programmers who do not want to mess with makefiles.

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
423 Views
jaylord wrote "..problem is, 'ippvmem64t' doesn't exist.."
Could you please look at the /opt/intel/Compiler/11.1/072/ipp/em64t/sharedlib directory.
Does that mean you cannot seelibippvm.so andlibippcore.sobinaries there?
--Gennady
0 Kudos
jaylord
Beginner
423 Views
There is a libippvmem64t.so (I'm using the 64-bit version) in /opt/intel/Compiler/11.1/072/ipp/ia32/sharedlib, but that's not what it's complaining about. It's looking for ippvmem64t (without the 'lib' at the begininng). Like I said, dynamic linking works although it doesn't seem to multithread. I think maybe IPP and CDT are out of sync and things are not being set up properly.
0 Kudos
jaylord
Beginner
423 Views
Hate to reply to my own post, but I just ran a quick test looping ippsDiv_32f_I() (a multi-threaded IPP function) 10,000 times on 1,000,000 element sized vectors and it is definately running single threaded.
0 Kudos
jaylord
Beginner
423 Views
Never Mind!

I figured it out. It was a RTFM (sort of) issue. It was all spelled out on this web page:

http://software.intel.com/en-us/articles/how-to-build-ipp-application-in-linux-environment/

I just wish this page was included in the download.



0 Kudos
Reply