Linux ICC: OpenMP Link

What are the steps to link to OpenMP with the Intel C ++ Compiler? Is the Intel compiler compiling with its own OpenMP library or should I reference libgom ?

Thanks!

+4
source share
3 answers

It seems to have its own implementation. You do not need to specify additional libraries while you compile the -openmp flag.

 $ icc -openmp tc $ ldd ./a.out ... libiomp5.so => /opt/intel/Compiler/11.1/072/lib/intel64/libiomp5.so (0x00007fd8e7ac6000) ... 
+6
source

The Intel C ++ compiler provides its own OpenMP library, it is not associated with libgomp. You can use the -static-intel flag with icc / icpc to get rid of the libiomp5.so dependency, so your binary works on systems that don't have the Intel C ++ compiler installed.

 $ icpc -openmp -static-intel t.cpp $ ./a.out 
+4
source

You must use icc's built-in implementation of openmp. Just pass the -openmp switch on the command line to have it!

+2
source

All Articles