lawmurray / LibBi

Bayesian state-space modelling on high-performance hardware, including multicore, GPUs and distributed clusters.
http://www.libbi.org
Other
96 stars 22 forks source link

update build process/instructions for OSX #7

Closed benswift closed 7 years ago

benswift commented 8 years ago

Hi folks

I'm sitting in a LibBi workshop in Melbourne, and tinkering around to get LibBi up and running on my OSX 10.11 laptop for local testing.

I'm a homebrew type of guy, and I followed the homebrew instructions in INSTALL_MAC.md, with the exception of gcc-47, which doesn't build cleanly on 10.11 (although I do have GCC 5.3 installed, also through homebrew).

I ran into a couple of issues: I had to "disable" the 010_cpu.t test, which seemed to be bombing out for openMP-related reasons. However, after deletting that test, libbi built and installed fine, and the Lorentz examples ran fine as long as I passed --disable-openmp in config.conf. Is this actually the issue (I'm not a perl guy, so I couldn't really tell exactly what was going wrong)? If so, should that test uderstand that openMP isn't compulsory (if you're always --disable-openmp ing it)?

I also had a small issue with Boost 1.60, and applied a simple, hacky fix (see additions to INSTALL_MAC.md).

Anyway, the bigger issues (if I do want to enable some of the accelerated stuff, e.g. avx or even cuda) are to do with the compiler selection, which seems to happen in share/configure.ac:134. As far as I can tell, llvm/clang supports OpenMP from 3.7 onwards, so I don't know if the futzing about with gcc from homebrew/versions is still necessary, but I may be wrong---I don't know the ins and outs of how LibBi works. I'm happy to look further into this if it helps.

This was all for my own edification, really, so I could run simple (i.e. unaccelerated) libbi stuff on my local OSX machine for development purposes. I'm not sure if this sort of thing is encouraged, and if it's not I'll just keep plugging away on my own, but if it helps this pull request contains some info which might help others.

hasingh commented 8 years ago

Have you tried running this with CUDA 7.5? I can run it with enable-sse but unable to make any progress with CUDA.

sbfnk commented 7 years ago

Note that LibBi can now be installed directly from homebrew:

http://libbi.org/2016/11/14/Easily-install-LibBi-from-Homebrew.html