Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29275 Discussions

How to make the compile option for OpenMP

Anonymous21
Beginner
391 Views
I want to use the OpenMP using Intel Fortran compiler. However, I can not find the direction for the compile option for OpenMP. I ama beginerfor the use of OpenMP.

Q:Does the Intel Fortram compiler 11.0 include the OpenMPwithout installationof OpenMP by myself?

Q: Could you let me knowhow toput inthe compile optionsusing OpenMP?

For example, IBM Fortran compiler isprovided as follows,
xlf90_r -qsmp=omp -o run run.f90

Q: I have 2 dual core CPUsfor Intel Zeon. If Iuse the OpenMP, how many the threadis used for mycomputer?

I think I just use 2 threads becauseOpenMP is suppored tothedistributed sheared memory.Is it corrected or
not?If it is not, I can use 4 threads in my system???

Thanks.
0 Kudos
1 Reply
TimP
Honored Contributor III
391 Views
Openmp is an integral part of Intel compilers for x86, x86_64, nothing additional to install.
Read about the OpenMP options by ifort -help or by looking at the html documentation in the compiler /Documentation/ folder
basic option is -openmp
You have several options to set number of threads. Default on a dual socket dual core would be 4. Setting environment variable OMP_NUM_THREADS=2 would cut it to 2.
The dual socket motherboard supports shared memory among all the cores. Setting the environment variable KMP_AFFINITY=compact,0, verbose might typically give optimum thread placement to use all 4 cores.
0 Kudos
Reply