Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

OpenMP on Linux

Tan-Killer
Beginner
416 Views

Multi-Thread Programming with OpenMP on linux

use GCC 4.3 with OpenMP or Intel C++ Compiler

who better?

0 Kudos
4 Replies
rreis
New Contributor I
416 Views
Quoting - Tan-Killer

Multi-Thread Programming with OpenMP on linux

use GCC 4.3 with OpenMP or Intel C++ Compiler

who better?


why don't you compile, run and tell? (post compile flags also, btw)
0 Kudos
TimP
Honored Contributor III
416 Views
Quoting - rreis

why don't you compile, run and tell? (post compile flags also, btw)
In addition, show the gcc results when linked against libgomp and against Intel libiomp. Set appropriate GOMP_CPU_AFFINITY, if your platform needs it.
In case it's of any interest, my results on Levine-Callahan-Dongarra "vectors" show gfortran 4.4 and ifort 10.1 or 11.0 perform within 10% on 10 of 12 OpenMP parallel cases. In the other 2, ifort comes way ahead. For C code, gcc beats icc more often, when run with the Intel library, but it's much the same story.
These are cases which combine opportunities for vectorization and OpenMP parallel, and are sufficiently well optimized that HyperThreading shows no advantage.
The 2 cases where gcc/gfortran fall behind show off the ability of Intel compilers to vectorize a wider range of intrinsic functions. Combined vector and parallel shows the greatest payoff for those cases.
Comparing gcc and MSVC9, gcc shows relatively little advantage in the OpenMP parallel cases, when running on CPUs from the recent past, as memory bandwidth limitations cut the advantage which gcc has for single thread benchmarks. MSVC9 has the best optimization of max_element/min_element, a remarkable recovery from earlier MSVC where those weren't supported.
0 Kudos
Tan-Killer
Beginner
416 Views
Quoting - tim18
In addition, show the gcc results when linked against libgomp and against Intel libiomp. Set appropriate GOMP_CPU_AFFINITY, if your platform needs it.
In case it's of any interest, my results on Levine-Callahan-Dongarra "vectors" show gfortran 4.4 and ifort 10.1 or 11.0 perform within 10% on 10 of 12 OpenMP parallel cases. In the other 2, ifort comes way ahead. For C code, gcc beats icc more often, when run with the Intel library, but it's much the same story.
These are cases which combine opportunities for vectorization and OpenMP parallel, and are sufficiently well optimized that HyperThreading shows no advantage.
The 2 cases where gcc/gfortran fall behind show off the ability of Intel compilers to vectorize a wider range of intrinsic functions. Combined vector and parallel shows the greatest payoff for those cases.
Comparing gcc and MSVC9, gcc shows relatively little advantage in the OpenMP parallel cases, when running on CPUs from the recent past, as memory bandwidth limitations cut the advantage which gcc has for single thread benchmarks. MSVC9 has the best optimization of max_element/min_element, a remarkable recovery from earlier MSVC where those weren't supported.

i use command

gcc-4.3 -fopenmp .....

and i have one question

why my status point for my account not show ?
0 Kudos
TimP
Honored Contributor III
416 Views
Quoting - Tan-Killer
i use command
gcc-4.3 -fopenmp .....
If you are compiling C++ code, and wish to compare these compilers, you must choose comparable options, such as
g++ -O3 -fopenmp -msse3
and
icpc -openmp -msse3 -ansi-alias -fp-model source
If your question should be phrased more precisely as "which compiler has better default options?" that one won't be solved here.
0 Kudos
Reply