Tuesday, September 18, 2012

More changes to the Fink CCP4 package

The main change is to move /sw/share/xtal/ccp4-6.3.0 to /sw/opt/ccp4-6.3.0.  This change of location is to remove a 10 year old violation of fink packaging policy. Briefly, packages with their own unix-like filesystem hierarchy (bin, lib, include, share, etc), should go into /sw/opt/packagename, whereas /sw/share is for platform-indepenent files (text files and so on).

Saturday, September 15, 2012

Phaser MPI on OS X: Fink package phaser-mpi

I am trying to get phaser to use all my processors


I've created a fink package called phaser-mpi that does the following automatically:

1. Phaser uses c++ by default (clang++ on OS X).  If you compile phaser using an untouched ccp4-phaser-N.tgz package distributed by CCP4, this works.  If you compile cctbx first, it will fail to compile with clang++.  So you either need to compile both with g++, which you can do by issuing the

--compiler=gcc

directive.  (No other such directive will work, fwiw.)  This is why I had such troubles building phaser for 10.8.1.

2.  Phaser can be tricked into linking the openmpi library by doing the following:

(a)  Install Fink's gcc47 compiler package.

(b)  Unpack CCP4's cctbx/phaser source code.

(c) cd into the ccp4-6.3.0 directory, and issue the following (one-line) command:


perl -pi.orig -e \
"s|cxx \= cc.replace\('gcc', 'g\+\+'\)|cxx \= cc.replace\('gcc', 'sw/bin/g\+\+-4'\)|g" \
lib/cctbx/cctbx_sources/cctbx_project/libtbx/SConscript  


(d) Issue the following commands within the phaser src directory:

export CXXFLAGS="-L/sw/lib"
export CFLAGS="-I/sw/include"
export CPPFLAGS="$CFLAGS"

mv bin bin.orig

/usr/bin/python \
../../lib/cctbx/cctbx_sources/cctbx_project/libtbx/configure.py \
--repository=source phaser \ 
--build-boost-python-extensions=False \ 
--enable-openmp-if-possible=True \ 
--static-exe \ 
--use-environment-flags \ 
--compiler=gcc  

source setpaths.sh  

libtbx.scons -j 8 .  

(e) Restore the original /usr/bin/g++ and /usr/bin/gcc.

(I have 8 processors.  This speeds up the build, but has nothing to do with the outcome.)

(3) Run it using the following KeyWord (in this case for 8 processors):

   JOBS  8  

Thanks to Kaspar Hollenstein for help, advice and encouragement.



Wednesday, September 12, 2012

Coot updated in fink to 0.7-pre-1-4408

Fix for Python problem in 10.8


Coot, for whatever reason, insisted upon linking to the system's python library rather than fink's python library, and this created problems for at least a subset of users.

Huw Jenkins suggested using the following approach, which has gotten me out of a few such binds in the past as well:

install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python  %p/lib/python2.7/config/libpython2.7.dylib %i/bin/coot-real

Briefly, it works.

Fix for compile problem introduced recently.


perl -pi -e 's|lidia_LDFLAGS = -Wl,--export-dynamic||g' lbg/Makefile

The compiler don't take kindly to   --export-dynamic

CCP4-6.3.0 now available in Fink

CCP4-6.3.0 in Fink:

I've finally managed to update the Fink CCP4 package that I maintain, so it will compile on OS X 10.8 and install CCP4 version 6.3.0, which was released about a month and a half ago.

I apologize for the delay.

I've managed to speed up the compile time, especially for phaser and cctbx.  The whole  thing takes less than a half hour to configure, compile and install on my 8 processor iMac.

I've put it into fink's cvs for 10.8 and 10.7.  I am almost ready to add it in for 10.6.  I have no way of testing anything below 10.6, and I am just assuming if it works on 10.8, it will work on 10.7.

Known problems:

bp3 and the associated "leiden" programs, as with previous versions, seg-faults at run time. I have no idea how to fix this.

rapper also seg-faults.

I tried very hard to get phaser to compile with mpi support.  I have not yet succeeded.

If you find additional problems, please post a description here.

And so it begins …

I thought it might be useful to log significant changes and updates related to my Crystallography on OS X website.