1
0
Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-09-19 17:03:46 +02:00
MUSIC/Makefile
jonorbe c7e6cd5825 ART module for dm-only operative. Right now the module generates all the files necessary with the correct format and (re-check mandatory) units. Therefore, ICs generated should run!
Here I write a list of to-do things:

- Find a clever way to set the char array in header. Should be set in the config file and then probably use some getValue?
- Re-check velocity units
- How important is the EKIN parameter of the header to start ART. We are not calculating it. It could be done when writing the files but seems to much work taking into account that it is probably calculated at each timestep.
- astep parameter: clarification on how is set/chosen for the initial conditions. It is important for subsequent steps or ART auto-regulates the next steps?
- Need some clarifications for zoom-in simulations:
	+ which NROWC and NGRIDC is used (now using levelmin, but levelmax?)
        + Number of files. Not clear if all together in one or one for each level (in the last case we will need to do some important changes in the module)
- Confirm our current format is standard for all ART versions.
2012-07-27 20:17:12 -07:00

86 lines
2.4 KiB
Makefile

##############################################################################
### compile time configuration options
FFTW3 = yes
MULTITHREADFFTW = yes
SINGLEPRECISION = no
HAVEHDF5 = yes
##############################################################################
### compiler and path settings
CC = g++
OPT = -Wall -O3 -g -msse2
CFLAGS =
LFLAGS = -lgsl -lgslcblas
CPATHS = -I. -I$(HOME)/local/fftw-3.2.2_double -I$(HOME)/local/include -I/opt/local/include -I/usr/local/include
LPATHS = -L$(HOME)/local/fftw-3.2.2_double -L$(HOME)/local/lib -L/opt/local/lib -L/usr/local/lib
##############################################################################
# if you have FFTW 2.1.5 or 3.x with multi-thread support, you can enable the
# option MULTITHREADFFTW
ifeq ($(MULTITHREADFFTW), yes)
CFLAGS += -fopenmp
LFLAGS += -fopenmp
ifeq ($(FFTW3),yes)
ifeq ($(SINGLEPRECISION), yes)
LFLAGS += -lfftw3f_threads
else
LFLAGS += -lfftw3_threads
endif
else
ifeq ($(SINGLEPRECISION), yes)
LFLAGS += -lsrfftw_threads -lsfftw_threads
else
LFLAGS += -ldrfftw_threads -ldfftw_threads
endif
endif
else
CFLAGS += -DSINGLETHREAD_FFTW
endif
ifeq ($(FFTW3),yes)
CFLAGS += -DFFTW3
endif
##############################################################################
# this section makes sure that the correct FFTW libraries are linked
ifeq ($(SINGLEPRECISION), yes)
CFLAGS += -DSINGLE_PRECISION
ifeq ($(FFTW3),yes)
LFLAGS += -lfftw3f
else
LFLAGS += -lsrfftw -lsfftw
endif
else
ifeq ($(FFTW3),yes)
LFLAGS += -lfftw3
else
LFLAGS += -ldrfftw -ldfftw
endif
endif
##############################################################################
#if you have HDF5 installed, you can also enable the following options
ifeq ($(HAVEHDF5), yes)
OPT += -DH5_USE_16_API -DHAVE_HDF5
LFLAGS += -lhdf5
endif
##############################################################################
CFLAGS += $(OPT)
TARGET = MUSIC
OBJS = output.o transfer_function.o Numerics.o defaults.o constraints.o random.o\
convolution_kernel.o densities.o cosmology.o poisson.o log.o main.o \
$(patsubst plugins/%.cc,plugins/%.o,$(wildcard plugins/*.cc))
##############################################################################
all: $(OBJS) $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(LPATHS) -o $@ $^ $(LFLAGS)
%.o: %.cc *.hh Makefile
$(CC) $(CFLAGS) $(CPATHS) -c $< -o $@
clean:
rm -rf $(OBJS)