clang-omp / clang

clang with OpenMP 3.1 and some elements of OpenMP 4.0 support
clang-omp.github.com
Other
91 stars 15 forks source link

openmp mutex results still lag gomp futex results #36

Closed jwhowarth closed 10 years ago

jwhowarth commented 10 years ago

I've done some initial benchmarking with the clang compiler from our llvm34-3.4.1-0e package in the fink project (which has openmp svn r208472 from llvm.org built against llvm/compiler-rt/clang 3.4.1 with the changes in clang-omp git at commit f9e2fd7640f8fc06ebe1ef2f065c6158f6b4b6ef vs stock clang 3.4 applied). Using the heated_plate_openmp.c demo code and the heated_plate_gcc.sh shell script to collect timings for one, two and four OMP processes, the following ratios of these timings (normalized to the one OMP process timing) were observed…

on a 16-core MacPro under darwin13

1:1.90:3.31 for FSF gcc 4.8.3 1:1.90:3.30 for FSF gcc 4.9.0 1:1.99:3.71 for clang 3.4.1 with openmp and the clang-omp merge

on a 24-core Fedora 15 linux box

1:1.99:3.92 for FSF gcc 4.6.3 1:1.99:3.93 for FSF gcc 4.8 branch svn

I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61333 on FSF gcc concerning the dramatically lower performance on darwin for gomp compared to either iomp5 on darwin or gomp on linux. The FSF gcc developers cited the use of futex on linux compared to pthread_mutex calls. We still see a 5.6% performance loss for iomp5 on darwin compared to the use of futex in gomp on linux. FYI, the test code and shell script used is attached to the PR 61333 FSF gcc bugzilla report in case the pthread_mutex usage on darwin can be tweaked to approach closer to the results for futex on linux.

alexey-bataev commented 10 years ago

Hi, Could you please send this info to openmp-dev mailing list here http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev? It is runtime lib problem, not a compiler. Best regards, Alexey Bataev