Loading...
 
(Cached)

Install

The installation notes are from J. R. Lu and include installing Open MPI, MultiNest and PyMC.

gfortran compiler

Install the gfortran compiler (see Setup a New Mac for Astronomy for link)

Set compiler flags as environment variables (I put these in my .cshrc).


   setenv FC gfortran

   setenv F90 gfortran

   setenv F77 gfortran

   setenv CC gcc

   setenv CFLAGS -m64

   setenv FFLAGS -m64

   setenv CXXFLAGS -m64

 

Open MPI

Download openmpi-1.6.5.tar.gz into the software_mlion/ directory. Unpack it. Set the above environment variables.

 

./configure

make all

sudo make install

 

 

 

MultiNest

Downloaded MultiNest_v3.2 (get a CCPForge account). Installed after lots of extreme modifications to the Makefile. Change ifort to mpif90. Change icc to mpicc. Change icpc to mpiCC. Add flag -m64. Add flags -ffree-line-length-none -fbounds-check -Wsurprising -g to FFLAGS:

 

 FC = mpif90
CC = mpicc
CXX = mpiCC
FFLAGS += -O3 -DMPI -m64 -ffree-line-length-none -fbounds-check -Wsurprising -g
CFLAGS += -O3 -DMPI -m64

 

change LINKLIB:

 LINKLIB = mpif90 -dynamiclib -arch x86_64 -undefined dynamic_lookup 

 

Change libnest3.so to libnest3.dylib

 libnest3.dylib: $(NSOBJECTS)  

 

 

Make everything:

 

 make clean
make libnest3.dylib
sudo cp libnest3.dylib /usr/local/lib/

 

 

PyMultiNest

Downloaded latest PyMultiNest ...actually I cloned the git repository, so just pull latest when you want to update. 

 

I also had to somewhat modify the Makefile to add -m64 and change the linker flags. I had to modify Makefile and the pymultinest/*.py codes to use libcnest.dylib instead of libcnest.so. I had to make several modifications to update and match changed function calls in cnest.c and run.py for MultNest v2.17. Once all this is done:

 

 setenv MULTINEST /usr/local/lib/

rm multinest_bridge/libcnest.dylib

make -C multinest_bridge libcnest.dylib

python setup.py install

cp multinest_bridge/libcnest.dylib /usr/local/lib/


Page last modified on Friday 06 of September, 2013 23:36:39 EDT