- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am new to Xeon Phi and experimenting with the offload programming mode in a simple main.cpp file. Eventually I want to use the offload mode in connection to our astrodynamical routines (I work at the European Space Agency)
I get the following error
catastrophic error: *MIC* cannot open source file "pagmo/src/keplerian_toolbox/lambert.h"
The file lambert.h (which exists on the host but not on the mic) is indeed included in main.cpp but its content is not used inside the offload directive.
I thought that the code for the mic was corss-compiled in the host, thus the headers had only to be on the host (I compiled boost and other libraries using the -mmic option like this) .... do I need to put all headers (also the boost ones) on the mic in this case? If so where?
Anyone has the same problem or I am just doing something very stupid?
Dario
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The header files need to exist on the host only for compiling. Since you have included it in the program, although not used in the offload code, you need to tell the compiler where to find it.
When you compile your program for host you must be providing the info to the compiler either through command line option -I or through env variable INCLUDE. For offload compilation you also need to indicate the location using -offload-option,mic,compiler,"-I /mypath/lambert.h"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thanks,
adjusting the compilation line to:
icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include" my_file.cpp
the code compiles, but tons of warnings are produced, they all say:
/usr/include/bits/stdio.h(132): warning #1292: *MIC* unknown attribute "__leaf__"
can I get rid of them somehow?
Dario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After reading this (http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-lin/GUID-C7EBD3CF-5031-4DD3-A774-0F54DB9E9BBF.htm)
I managed to find out that the following would indeed solve most of the problems:
icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include" prova_superlinear.cpp -o offload_no_mic
but I still get tons of warnings:
In file included from /usr/include/stdio.h(934),
from /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0/cstdio(44),
from /usr/include/boost/lexical_cast.hpp(33),
from /usr/local/include/pagmo/src/problem/../serialization.h(35),
from /usr/local/include/pagmo/src/problem/ackley.h(30),
from prova_superlinear.cpp(5):
/usr/include/bits/stdio.h(132): warning #1292: *MIC* unknown attribute "__leaf__"
what am I forgetting now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include"prova_superlinear.cpp -o offload_no_mic
/usr/local .... are the includes for the host
The includes for MIC are in /usr/linux-k1om-4.7/linux-k1om/usr/include/ and you don't need to include them. The compiler automatically picks them up if you have setup your env correctly using the compilervars script in the compiler bin directory. Only add user include in the -offload-option,mic,compiler.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page