Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
4 Views

IPP 7.0 Beta :Using mutliple versions of IPP

Hello,

I have multiple versions of IPP installed. We first installed the ICC suite which installed its own version of IPP. We next installed the IPP 7.0 Beta to work with AVX and Sandy Bridge.

I understand from http://software.intel.com/en-us/articles/intel-ipp-70-library-install-guide/ that the directory structure of IPP has changed. The 7.0 beta of IPP installed inside a compilerpro-12.0 directory and the actual ICC is installed in a Compiler directory all inside of /opt/intel/ (I'm on a linux machine).

How do I know that building an application has used the correct version of IPP? I know there is an $IPPROOT environment variable, but it doesn't seem to be using that. When I build an application using the IPP samples, it seems to be using the older version of IPP. As a note, these IPP samples were from the older version of IPP. Does that script automatically use older IPP? I will try the IPP samples from 7.0.

When I used to build my own applications, I used to supply icc with the -ipp build option and it always seemed to get the libraries I needed. Is this still available in 7.0? Or do I have to actually specify the libraries?

My main questions are how ICC finds IPP, and what is the correct way of building an application with ICC and IPP? Also, with the 7.0 Beta, how do I know that AVX instructions have been used?

Thank you!
0 Kudos
4 Replies
Highlighted
4 Views

Hello Derek,

I'm not sure how the compiler identifies which version of the IPP library to reference when you use the -ipp option, I'll try to get some clarification.

I suspect that on a Linux machine it is using soft links to point to what it considers to be the "default" IPP installation. If this assumption is correct, it would imply that even though you installed the 7.0 beta library for IPP, the older compiler (I'm assuming you're using an 11.x or earlier version of the compiler) has a different directory structure than the upcoming 12.0 product. This might then explain why the more recent version of the IPP library is not "being seen" by the compiler, since the older compiler doesn't know about the new directory structure.

In any event, if you have multiple copies of the library installed, and want to switch between them, you'll have to employ something like the $IPPROOT environment variable and/or switches in your makefiles/build scripts.

Note that the build scripts supplied with sample code is configured for and tested against the specific version of the library it was distributed with. Those scripts are not guaranteed to work with any other version of the library, especially given the significant changes in the directory structure between 6.1 and 7.0.

Also, regarding AVX, note that you do have to enable use of the AVX library in this version of the beta, it will not happen automatically. Automatic detection will not be enabled until a later beta and will definitely be part of the final release. See this article for info on how to enable the AVX library:

IPP Dispatcher Control Functions - ipp*Init*() functions

And take a look at the CPUINFO sample for information on how to detect processor features, etc.

Paul

p.s. You can use the older compiler, or the gcc compiler, with 7.0.
0 Kudos
Highlighted
Beginner
4 Views

Paul,

Thanks for the commitment to look into what the -ipp option actually does.

So, in your opinion, what is the best way to link to an IPP library in the makefile. Say I am using the FFT function in the image IPP library. What should my Makefile look like?

Thanks in advance,
Derek
0 Kudos
Highlighted
4 Views

Hello Derek,

Sorry, I didn't have time today to investigate the -ipp option, hope to find out tomorrow...

I would reference the $IPPROOT environment variable within your makefile (or define it directly in your makefile) and then explicitly name ALL the IPP lib files in the makefile on the link command-line. The linker will only include those functions required by your app, so you're not unnecessarily bloating your code with this approach, and you don't have to figure out which files do I link with and which do I not, let the tools do that for you.

See this article for more info (based on 6.1, will be updated for 7.0 when time allows):

Simplified Link Instructions for the IPP Library

about using a "brute force" name everything on the link command line approach.

Paul
0 Kudos
Highlighted
4 Views

Derek,

The documentation is unclear, but it appears that the compiler uses thecopy of IPP that was installed in the compiler directories when you use the -ipp option. If you want to get more detail on the behavior of this option it might be best to post the question in the compiler forum.

Regards,

Paul
0 Kudos