-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
72 lines (56 loc) · 2.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#=======================================================================
# Makefile for incompact3D
#=======================================================================
OPTIONS = -DDOUBLE_PREC
# Choose an FFT engine, available options are:
# fftw3 - FFTW version 3.x
# generic - A general FFT algorithm (no 3rd-party library needed)
FFT= generic
# Paths to xbeam
xbeam_PATH=/home/yorgos/xbeam
xbeam_INCLUDE=-I$(xbeam_PATH)/src
xbeam_LIB=-L$(xbeam_PATH)/lib
# Paths to FFTW 3
FFTW3_PATH= # full path of FFTW installation if using fftw3 engine above
FFTW3_INCLUDE = -I$(FFTW3_PATH)/include
FFTW3_LIB = -L$(FFTW3_PATH)/lib -lfftw3 -lfftw3f
# GNU
FC = mpif90
OPTFC = -O3 -funroll-loops -ftree-vectorize -fcray-pointer -cpp -ffree-line-length-0 -g -fbacktrace -fcheck=all -fcheck=bounds -ffpe-trap=invalid,zero
CC = mpicc
CFLAGS = -O3
LIBS = -fopenmp -llapack -lblas
# include PATH
ifeq ($(FFT),generic)
INC=
else ifeq ($(FFT),fftw3)
INC=
endif
SRC = decomp_2d.f90 glassman.f90 fft_$(FFT).f90 module_param.f90 io.f90 variables.f90 poisson.f90 les_models.f90 SVV.f90 schemes.f90 convdiff.f90 acl_utils.f90 airfoils.f90 dynstall.f90 dynstall_legacy.f90 acl_elem.f90 acl_controller.f90 acl_turb.f90 acl_out.f90 acl_farm_controller.f90 acl_model.f90 acl_source.f90 adm.f90 WInc3D.f90 navier.f90 filters.f90 derive.f90 parameters.f90 tools.f90 visu.f90 probe.f90 cfl.f90 ABL.f90
ifneq (,$(findstring DSHM,$(OPTIONS)))
SRC := FreeIPC.f90 $(SRC) $(SRCALM)
OBJ = $(SRC:.f90=.o) alloc_shm.o FreeIPC_c.o
OBJALM = $(SRCALM:.f90=.o) alloc_shm.o FreeIPC_c.o
else
OBJ = $(SRC:.f90=.o)
OBJALM = $(SRCALM:.f90=.o)
endif
all: winc3d visualize
fileOperation.o: fileOperation.c
$(CC) $(CFLAGS) -c $<
alloc_shm.o: alloc_shm.c
$(CC) $(CFLAGS) -c $<
FreeIPC_c.o: FreeIPC_c.c
$(CC) $(CFLAGS) -c $<
winc3d : $(OBJ)
$(FC) -O3 -o $@ $(OBJ) $(LIBFFT) $(LIBS) $(DEBUG)
%.o : %.f90
$(FC) $(OPTFC) $(OPTIONS) $(INC) $(DEBUG) -c $<
visualize :
mpif90 paraview_incompact3d.f90 -o visualize
.PHONY: clean
clean:
rm -f *.o *.mod incompact3d visualize
.PHONY: realclean
realclean: clean
rm -f *~ \#*\#