Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Intel 17.0 C++ and OpenMP

Trevor_Coulson
Beginner
608 Views

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?)

Thanks

 

 

0 Kudos
7 Replies
Trevor_Coulson
Beginner
608 Views

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.

0 Kudos
TimP
Honored Contributor III
609 Views

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.

0 Kudos
Anoop_M_Intel
Employee
609 Views

Hi Trevor, I am already working with you on Intel Premier Support on this. So I am closing this forum thread.

Thanks and Regards
Anoop

0 Kudos
Jacques_P_
Beginner
609 Views

#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

0 Kudos
Royi
Novice
609 Views

Does Intel Compiler 17.0 supports Static Linking of the OpenMP library?

I know it is highly not recommended to do so and still.

Thank You.

0 Kudos
TimP
Honored Contributor III
609 Views

The versions of 17.0 compilers which I use don't supply a static library for OpenMP nor cilkrts.

0 Kudos
SergeyKostrov
Valued Contributor II
609 Views
>>...Does Intel Compiler 17.0 supports Static Linking of the OpenMP library?.. Static linking of OpenMP libraries is Not available with any versions of Intel C++ compiler. My question is: Why do you need static linking OpenMP libraries?
0 Kudos
Reply