In the process of converting a Microsoft C++ project to Intel 17.0 C++. Taking advantage of OpenMP 2.0 that Microsoft offers.
Getting a couple of unresolves at the linker stage:-
error LNK2019: unresolved external symbol "?1start_omp_cancel" (?1start_omp_cancel) referenced in function
error LNK2019: unresolved external symbol "?1finish_omp_cancel" (?1finish_omp_cancel) referenced in function
No use of #pragma omp cancel (not an OpenMP 2.0 feature anyway).
Anyone know what may be triggering this? (Some library I need to add?)
Narrowed down the issue to use of:-
#pragma omp barrier
Which I need....... but I may be able to workaround it via a dummy parallel loop that has an implicit barrier at the end or simply disable use of OpenMP for this small portion of code.
ICL OpenMP library is supposed to support all Microsoft OpenMP derived function calls, including those associated with omp barrier. You must assure that you don't link the Microsoft vopenmp as well as the Intel libiomp5. Using ICL /Qopenmp to link normally takes care of this by adding nodefaultlib directives to prevent use of the Microsoft library as well as adding the search of the Intel library.
If there is a bug in the ICL 17.0 beta update 1, or even just a problem with usage, your beta agreement specifies that you should report via Intel Premier site problem report, rather than here.
#pragma omp barrier causing same issue in compilation on our code. (Not linked to Microsoft OMP whatsoever)
If you have found a fix for this please let know !
Error : relocation R_X86_64_PC32 against undefined symbol `?1start_omp_cancel' can not be used when making a shared object; recompile with -fPIC
Note that I am already compiling with -fPIC
System : Xeon Phi
Compiler : 17.0.0