[cctbxbb] Enabling OpenMP for phaser on OS X

William G. Scott wgscott at ucsc.edu
Mon Sep 17 14:11:40 PDT 2012


On Sep 17, 2012, at 4:32 AM, Luc Bourhis  wrote:

> one would need to modify libtbx/SConscript to support that version. 

Thanks again for your help.

This made it work:

-------------------------------------------------------------------------------------------------------------------
--- SConscript.orig	2012-09-17 13:55:45.000000000 -0700
+++ SConscript	2012-09-17 13:59:56.000000000 -0700
@@ -682,7 +682,7 @@
       if cc == 'clang':
         cxx = 'clang++'
       else:
-        cxx = cc.replace('gcc', 'g++')
+        cxx = cc.replace('gcc', '/sw/bin/g++-4')
         if env_etc.compiler.endswith("4.2"):
           if libtbx.env.build_options.enable_boost_threads:
             build_nb = libtbx.env_config.get_darwin_gcc_build_number(gcc=cxx)

-------------------------------------------------------------------------------------------------------------------



Then I just configured with  --compiler=gcc   (and --enable-openmp-if-possible=True  )

The resulting binary links the relevant lib:

% otool -L exe/phaser
exe/phaser:
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.17.0)
	/sw/lib/gcc4.7/lib/libgomp.1.dylib (compatibility version 2.0.0, current version 2.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
	/sw/lib/gcc4.7/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)




More information about the cctbxbb mailing list