On 06/02/15 16:27, Pascal Stumpf wrote: > On Tue, 02 Jun 2015 16:20:06 +0200, Guenther Niess wrote: >> Hi, >> I wanted to compile and run a small simulation with OpenMP and applied >> the patch below to compile gcc 4.9 with libgomp. It seems very >> straightforward so I'm wondering why it is disabled in ports? >> >> I run a make test and what I can see the openmp test seems to have no >> problem.. >> >> Running >> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/format/format.exp >> ... >> Running >> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/gomp/gomp.exp ... >> Running >> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/graphite/graphite.exp >> ... >> Running >> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/guality/guality.exp >> ... > > Thanks; this was on my to-do list. I'll test and commit as time > permits. >
To test a little bit more I added an openmp flavor to rawtherapee and run the default benchmark from the tools directory with and without OpenMP. Here some results from -CURRENT and with my Core2 Quad CPU Q6600. Without: Benchmark 01 "Neutral.pp3"........................ 13.433 Benchmark 02 "Neutral.pp3"........................ 13.199 Benchmark 03 "Neutral.pp3"........................ 13.160 Benchmark 04 "Neutral.pp3"........................ 13.189 Benchmark 05 "Neutral.pp3"........................ 13.152 Benchmark "Neutral.pp3" average....................13.226 Benchmark 01 "Default.pp3"........................ 20.859 Benchmark 02 "Default.pp3"........................ 20.891 Benchmark 03 "Default.pp3"........................ 20.868 Benchmark 04 "Default.pp3"........................ 20.904 Benchmark 05 "Default.pp3"........................ 20.754 Benchmark "Default.pp3" average....................20.855 Benchmark total.................................. 170.409 Average times for each tool: Default.pp3........................................20.855 Neutral.pp3........................................13.226 With enabled OpenMP: Benchmark 01 "Neutral.pp3"..........................4.668 Benchmark 02 "Neutral.pp3"..........................4.664 Benchmark 03 "Neutral.pp3"..........................4.652 Benchmark 04 "Neutral.pp3"..........................4.659 Benchmark 05 "Neutral.pp3"..........................4.687 Benchmark "Neutral.pp3" average.................... 4.666 Benchmark 01 "Default.pp3"..........................6.838 Benchmark 02 "Default.pp3"..........................7.506 Benchmark 03 "Default.pp3"..........................7.007 Benchmark 04 "Default.pp3"..........................6.776 Benchmark 05 "Default.pp3"..........................6.815 Benchmark "Default.pp3" average.................... 6.988 Benchmark total....................................58.272 Average times for each tool: Default.pp3........................................ 6.988 Neutral.pp3........................................ 4.666 And the patch I used: Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/rawtherapee/Makefile,v retrieving revision 1.11 diff -u -p -r1.11 Makefile --- Makefile 31 May 2015 06:32:06 -0000 1.11 +++ Makefile 11 Jun 2015 09:16:33 -0000 @@ -26,11 +26,21 @@ WANTLIB += tiff z MASTER_SITES = http://www.rawtherapee.com/shared/source/ EXTRACT_SUFX = .tar.xz +FLAVORS = openmp +FLAVOR ?= + MODULES = devel/cmake \ devel/gettext RUN_DEPENDS = devel/desktop-file-utils \ x11/gtk+3,-guic +.if ${FLAVOR:Mopenmp} +WANTLIB += gomp +MODULES += gcc4 +MODGCC4_ARCHS = amd64 i386 +MODGCC4_LANGS = c c++ +.endif + LIB_DEPENDS = audio/libcanberra,-gtk \ devel/libsigc++-2 \ graphics/libiptcdata \ @@ -39,8 +49,11 @@ LIB_DEPENDS = audio/libcanberra,-gtk \ x11/gtk2mm CONFIGURE_ARGS += -DBUILD_SHARED=ON \ - -DOPTION_OMP=OFF \ -DCMAKE_CXX_FLAGS_RELEASE=${CXXFLAGS} + +.if !${FLAVOR:Mopenmp} +CONFIGURE_ARGS += -DOPTION_OMP=OFF +.endif #NO_TEST = Yes
