Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installation of Gadget-2.0.7 on OSX 10.8.4
# Packages used:
gsl 1.15 http://ftp.df.lth.se/pub/ftp.gnu.org/pub/gnu/gsl/gsl-1.16.tar.gz
openmpi 1.6.5 http://www.open-mpi.org/software/ompi/v1.6/
fftw 2.1.5 http://fftw.org/fftw-2.1.5.tar.gz
hdf5 1.6.10 http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.6.10/src/
Gadget 2.0.7 http://www.mpa-garching.mpg.de/gadget/
## Compiling prerequisites
GSL:
./configure --prefix=/where/to/install
make
make install
OpenMPI:
./configure --prefix=/where/to/install
(include --enable-static or add /where/to/install to your LD_LIBRARY_PATH)
make all install
add the bin subdirectory of the installation directory to your PATH
FFTW-2.1.5:
for single precision:
./configure --prefix=/where/to/install --enable-mpi --enable-type-prefix --enable-float
make
make install
On OSX 10.8.4, compiling with paths hardcoded in the Makefile worked:
ifeq ($(SYSTYPE),"MPA")
CC = mpicc
OPTIMIZE = -O3 -Wall
GSL_INCL = -I/path/you/installed/gsl-1.15/include
GSL_LIBS = -L/path/you/installed/gsl-1.15/lib
FFTW_INCL= -I/path/you/installed/fftw-2.1.5/include
FFTW_LIBS= -L/path/you/installed/fftw-2.1.5/lib
MPICHLIB =
HDF5INCL = -I/path/you/installed/hdf5-1.6.10/include
HDF5LIB = -L/path/you/installed/hdf5-1.6.10/lib -lhdf5 -lz
endif
you also have to enable long ids:
OPT += -DLONGIDS
add gadget2 dir to path:
export PATH=$PATH:/path/you/installed/Gadget-2.0.7/Gadget2
run gadget2 on multiple cores (within the handson directory):
mpirun -np 4 Gadget2 param.txt
# Things that helped compiling Gadget2
http://astrobites.org/2011/04/02/installing-and-running-gadget-2/
http://icc.ub.edu/~liciaverde/howtoinstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment