-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.milner
66 lines (51 loc) · 1.5 KB
/
Makefile.milner
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
# Modules:
#
# module load cray-libsci
# module load cray-tpsl
#
###############################################################################
# Rules
#
all: pasta_loca.exe
default: pasta_loca.exe
include Dependencies.inc
# Is Dependencies.inc available ?
Dependencies.inc:
@echo "##################################################################"
@echo BEFORE COMPILING, YOU SHOULD HAVE AN APPROPRIATE FILE
@echo Dependencies.inc AVALAIBLE.
@echo "##################################################################"
@exit 1
release:
@echo making release
@rm -f *.mod *.o
@cd .. && tar -czf ./backups/pasta_loca_$(NOW).tar.gz pasta_loca/
pasta_loca.exe: main.o $(OBJ)
$(F90LNK) $(F90FLAGS) main.o $(OBJ) $(LIBS) -o $(FOLDER)$(NAME)
clean:
@echo cleaning
@rm -f *.o *.mod
###############################################################################
# Define variables
NOW := $(shell date +"%c" | tr ' :' '__')
# Compilers
FC = ftn -fpp
F90CMP = $(FC) -c
F90LNK = $(FC)
F90OPT = -O3 -openmp #-Ofast -unroll-aggressive -align -fp-model fast=2
F90DEB = -DASCIIRESTART -DDEBUG=3 -DMUMPSDEBUG=0 #-g
F90FLAGS = $(F90OPT) $(F90DEB)
# Include paths
F90INCDIR =
# Libraries
LIBARPACK = # needs to be compiled
LIBMUPS = -ldmumps -lzmumps -lmumps_common -lpord
LIBS = $(LIBMUMPS) $(LIBARPACK)
FOLDER = ./testCase/
NAME = pasta_loca
###############################################################################
# Rules
.SUFFIXES:
.SUFFIXES: .f90 .o
.f90.o:
$(F90CMP) $(F90FLAGS) $(F90INCDIR) $<