-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.tegner
68 lines (53 loc) · 1.81 KB
/
Makefile.tegner
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
# Modules:
#
# module add gcc/4.9.2
# module add openmpi/1.8-gcc-4.9
# module add mumps/5.0.0-gcc-4.9
#
###############################################################################
# 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 = mpif90 -cpp
F90CMP = $(FC) -c
F90LNK = $(FC)
F90OPT = -O2 #-fopenmp
F90DEB = -DDEBUG=0 -DMUMPSDEBUG=0 #-g -Wall -Wextra -pedantic -fcheck=all
F90FLAGS = $(F90OPT) $(F90DEB) $(PASTAFLAGS)
# Include paths
F90INCDIR = -I/pdc/vol/mumps/5.0.0/gcc/4.9/include
# Libraries
LIBARPACK = # needs to be compiled
LIBMKL = -L/pdc/vol/i-compilers/15.0.2/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -Wl,--rpath,/pdc/vol/i-compilers/15.0.2/mkl/lib/intel64
LIBMUMPS = -L/pdc/vol/mumps/5.0.0/gcc/4.9/lib -ldmumps -lzmumps -lmumps_common -lpord
LIBS = $(LIBMUMPS) $(LIBMKL)
FOLDER = $(CASEDIR)/
NAME = $(PASTANAME)
###############################################################################
# Rules
.SUFFIXES:
.SUFFIXES: .f90 .o
.f90.o:
$(F90CMP) $(F90FLAGS) $(F90INCDIR) $<