-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (49 loc) · 1.47 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
tools = ifx
ifeq ($(tools),ifort)
compiler = ifort
flags = -Ofast -parallel -align -xHost -qopenmp -ipo -std18 -warn all,noexternal
libs = -mkl
else ifeq ($(tools),ifx)
compiler = ifx
flags = -Ofast -align -xHost -qopenmp -ipo -std18 -g -warn all,noexternal
libs = -qmkl
else ifeq ($(tools),gfortran)
compiler = gfortran
flags = -Ofast -march=native -mtune=native -pipe -fopenmp -flto -Wall -pedantic -g
libs = -llapack -lblas -lm
else ifeq ($(tools),arm)
compiler = armflang
flags = -Ofast -fopenmp -mcpu=a64fx -flto -Wall
libs = -armpl
else ifeq ($(tools),nvidia)
compiler = nvfortran
flags = -fast -Mconcur -Minfo -Mvect -mp=gpu -gpu=ccall
libs =
else ifeq ($(tools),fujitsu)
compiler = mpifrt
flags = -Kparallel -Kopenmp -Kreduction -KSVE -Kfast -flto -fi
libs = -SSL2
else ifeq ($(tools),cray)
compiler = mpifort
flags = -O3 -h omp,scalar3,vector3,ipa3,contiguous,nobounds,wp,pl=./_pl
libs =
else
$(error Unknown toolchain?)
endif
.PHONY: all clean
all: bin/defaultModel
bin/defaultModel: src/defaultModel.f90 defMod.o
$(compiler) $(flags) -o bin/defaultModel *.o src/defaultModel.f90 ${libs}
sim.o: src/sim.f90
$(compiler) $(flags) -c src/sim.f90
NL.o: src/NL.f90
$(compiler) $(flags) -c src/NL.f90
defMod.o: src/defMod.f90 NL.o sim.o
$(compiler) $(flags) -c src/defMod.f90
clean:
rm -f bin/* ./*.mod ./*.o
cleanresults:
rm -f results/*.tab results/*.bin
cleanmlab:
rm -f results/*.mat results/*.fig
ccc: clean cleanresults