Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexander_D_1
New Contributor I
722 Views

*MIC* cannot open source file "ipp.h"

Jump to solution

Hi,

I try to use IPP in offload section code for Intel Xeon Phi Сoprocessor. My simplified code is the following:

#pragma offload_attribute(push, target(mic)) // {
#include <ipp.h>
#pragma offload_attribute(pop) //}

int main(int argc, char* argv[])
{
}

and I get next errors:

1>------ Сборка начата: проект: ConsoleApplication1, Конфигурация: Debug x64 ------
1>  main.cpp
1>  Threaded versions of Intel(R) IPP libraries are deprecated and will be removed in one of the future Intel(R) IPP releases. Use the following link for details: https://software.intel.com/sites/products/ipp-deprecated-features-feedback/
1>ipo: : error #11018: Cannot open ipp
1>ipo: : error #11018: Cannot open lipps
1>ipo: : error #11018: Cannot open lippcore
1>ipo: : error #11018: Cannot open lippvm
1>LINK : fatal error LNK1104: не удается открыть файл "ipp.obj"
========== Сборка: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0 ==========

 

 

I have Intell Parallel Studio XE 2017 (update 4) with VS 2013 and MPSS 3.8.2

What could be the problem? 

 

Best regards,

Alexander D.

0 Kudos
1 Solution
Alexander_D_1
New Contributor I
722 Views

So, 

I found an example of using the IPP library in installation directory of Intell Parallel Studio XE 2015 (or later)

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp\examples\components_and_examples_mic.zip

This archive contains tutorial of using IPP for offload compilation and examples files (note: compilation command string for windows in tutorial not correct in any cases. See make file in examples for right options).

 

So you must set environment variable IPPROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp.

And if you use IPP only in offload section, you can use for compilation next command string:

icl /GR- /Qoffload-arch:mic /Qoffload-option,mic,compiler,"-I\"%IPPROOT%\"/include" /I"%IPPROOT%"/include /Qoffload-option,mic,link,"-L\"%IPPROOT%\"/lib/intel64_win_mic -lippi -lipps -lippcore -lippvm -lpthread" whyme.cpp

Note that in this case all code uses IPP must be wrapped :

#if defined(__MIC__)
//...
// code using IPP
//...
#endif

In other case if you not using #ifdef directives or use IPP in host's program you need added to compilation command Ipp libs for windows (I did not study this case)

In theory this options you can set into IDE but I did not study this case too.

Correct me if I wrong, thanks.

Best regards,

Alexander D.!

View solution in original post

3 Replies
Alexander_D_1
New Contributor I
722 Views

I added the following path:

to "C/C++->General->Additional include directories" :

C:\Program Files %28x86%29\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp\include

to "Linker->General->Additional Library Directories":

C:\Program Files %28x86%29\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp\lib\intel64_win

to "Linker->Input->Additional Dependencies:

ippcc.lib;ippccmt.lib;ippch.lib;ippchmt.lib;ippcore.lib;ippcore_tl.lib;ippcoremt.lib;ippcv.lib;ippcvmt.lib;ippdc.lib;ippdcmt.lib;ippi.lib;ippi_tl.lib;ippimt.lib;ipps.lib;ippsmt.lib;ippvm.lib;ippvmmt.lib;

And ... I can use IPP types like 'Ipp64f' or 'Ipp16sc' but not can use some IPP function.

It gets error  ' "xilink.exe" exited with code 1' and warnings that *MIC* unresolved IPP function.

Can anybody help me?

Alexander_D_1
New Contributor I
723 Views

So, 

I found an example of using the IPP library in installation directory of Intell Parallel Studio XE 2015 (or later)

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp\examples\components_and_examples_mic.zip

This archive contains tutorial of using IPP for offload compilation and examples files (note: compilation command string for windows in tutorial not correct in any cases. See make file in examples for right options).

 

So you must set environment variable IPPROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\ipp.

And if you use IPP only in offload section, you can use for compilation next command string:

icl /GR- /Qoffload-arch:mic /Qoffload-option,mic,compiler,"-I\"%IPPROOT%\"/include" /I"%IPPROOT%"/include /Qoffload-option,mic,link,"-L\"%IPPROOT%\"/lib/intel64_win_mic -lippi -lipps -lippcore -lippvm -lpthread" whyme.cpp

Note that in this case all code uses IPP must be wrapped :

#if defined(__MIC__)
//...
// code using IPP
//...
#endif

In other case if you not using #ifdef directives or use IPP in host's program you need added to compilation command Ipp libs for windows (I did not study this case)

In theory this options you can set into IDE but I did not study this case too.

Correct me if I wrong, thanks.

Best regards,

Alexander D.!

View solution in original post

Alexander_D_1
New Contributor I
722 Views

And in addition I want to write options of a project in VS IDE that I set to work with IPP in offload section on MIC.

I hope this helps someone:

  1. C/C++ -> Additional Include Directories: "$(IPPROOT)"/include
  2. C/C++ -> Code Generation [Intel] -> Additional Options for MIC Offload Compiler: -I\"$(IPPROOT)\"/include
  3. C/C++ -> Code Generation [Intel] -> Offload Target Architecture: MIC (/Qoffload-arch:mic)
  4. C/C++ -> Language -> Enable Run-Time Type Information: Нет (/GR-)
  5. C/C++ -> Language [Inter C++] -> OpenMP Support: Generate Parallel Code (/Qopenmp)
  6. (If your use C++11) C/C++ -> Language [Inter C++] -> Enable C++11 Support: Yes (/Qstd=c++11)
  7. Linker -> General [Inter C++] -> Additional Options for MIC Offload Linker: -L\"$(IPPROOT)\"/lib/intel64_win_mic -lippi -lipps -lippcore -lippvm -lpthread.

Best regards,

Alexander D.!

Reply