I try to use Cilk_offload on host + Xeon Phi. example.cpp:
#pragma offload_attribute (push, _Cilk_shared) #include <vector> #include <string> #include "offload.h" #pragma offload_attribute(pop) int main(const int argc, const char *argv[]) { return 0; }
Building: icc example.cpp -o example
When I try to run it, I get the following error:
On the sink, dlopen() returned NULL. The result of dlerror() is "/var/volatile/tmp/coi_procs/1/6847/load_lib/iccoutY1s4hB: undefined symbol: pthread_cancel_wrapper"
On the remote process, dlopen() failed. The error message sent back from the sink is /var/volatile/tmp/coi_procs/1/6847/load_lib/iccoutY1s4hB: undefined symbol: pthread_cancel_wrapper
offload error: cannot load library to the device 0 (error code 20)
And if I remove "#include <string>", everything is ok.
I need <vector> and <string> in a complex program where I have the same problem.
What should I do?