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

Runtime error when define library header outside pragma offload_attribute?

 

,I found that if I am using pragma offload_attribute to push library either to _Cilk_shared or target(mic),  I should not define some librarys(cilk or iostream) outside of this pragma.

I ran into this problem where If I define iostream outside the pragma I will get a run time error on MIC where it says can not load library blablabla

similar things for library such as Cilk. I have to put Cilk header inside offload_attribute and I can not put the header outside

For example the simple code I attached , if I uncomment line 2(#define <iostream>) in RegionF.cxx, I will get a run time error on MIC "can not load library", no matter whether I have already put iostream inside pragma offload_attribute or not

compile:  icpc RegionF.cxx

I am not sure this is intended or some bugs?

icc version:

icpc version 13.1.0 (gcc version 4.4.7 compatibility)

 

0 Kudos
1 Reply
Highlighted
Beginner
14 Views

Sorry , in the example , if I uncomment line 4 in RegionF.h (#include <iostream>) it gives me the error. Uncomment line 2 in RegionF.cxx gives me error yesterday..Maybe I changed something. 

0 Kudos