Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Nav
New Contributor I
142 Views

How does Intel compiler locate openmp headers?

Jump to solution

I do not know how gcc finds the openmp headers either, but I guess the path would be set because openmp comes bundled with gcc.

But since the openmp header files don't come bundled with the Intel C++ compiler, how does the compiler find the files? I'm working on Fedora.

If GCC was not installed on my system, how would I be able to run openmp on the Intel C++ compiler? Would I have to download all the openmp headers, place it in a folder and specify an environment variable that will lead the compiler to that folder?

How would I go about doing it?

0 Kudos
1 Solution
JenniferJ
Moderator
142 Views
Quoting Nav
But since the openmp header files don't come bundled with the Intel C++ compiler, how does the compiler find the files? I'm working on Fedora.
Correction. The openmp header "omp.h" is included in the Intel C++ compiler. Please check the "/opt/intel/.../include" directory.
If you installed gcc as suggested by others, you should see "omp.h" is also provided by gcc. But you should use the "omp.h" from Intel C++ compiler if you'll build your app with it.
So to get it working, you'll need to do:
1. install the gcc and libs
2. install the Intel C++ compiler 11.1 for Linux
3. open a shell command window, source the "iccvarsXX.sh" to set up the correct environment
4. use "icpc" to build .cpp files or "icc" for .c files
Thanks,
Jennifer

View solution in original post

4 Replies
aazue
New Contributor I
142 Views

Hi

About your remarks

(If GCC was not installed on my system .....)

If Gnu compiler is not installed you can not install or running Icc.

Kind regards

TimP
Black Belt
142 Views
As Bustaf said, icc requires an active installation of g++, from which it takes most of the headers and libraries. It doesn't require openmp support in the g++, as it can use older versions of g++, so all OpenMP required headers are taken from icc's own include directory.
JenniferJ
Moderator
143 Views
Quoting Nav
But since the openmp header files don't come bundled with the Intel C++ compiler, how does the compiler find the files? I'm working on Fedora.
Correction. The openmp header "omp.h" is included in the Intel C++ compiler. Please check the "/opt/intel/.../include" directory.
If you installed gcc as suggested by others, you should see "omp.h" is also provided by gcc. But you should use the "omp.h" from Intel C++ compiler if you'll build your app with it.
So to get it working, you'll need to do:
1. install the gcc and libs
2. install the Intel C++ compiler 11.1 for Linux
3. open a shell command window, source the "iccvarsXX.sh" to set up the correct environment
4. use "icpc" to build .cpp files or "icc" for .c files
Thanks,
Jennifer

View solution in original post

Nav
New Contributor I
142 Views
Thanks Jennifer. I had a look at the omp.h of the Intel compiler. Interesting to know...
Reply