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