-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.abisko
80 lines (65 loc) · 2.65 KB
/
Makefile.abisko
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
73
74
75
76
77
78
79
80
# Modules:
#
# module add mkl/11.1.2
# module add arpack/gcc/96
# module add openmpi/gcc/1.8.8
#
###############################################################################
# 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/usr/include $(MUMPS_INCLUDE) $(SCOTCH_INCLUDE) $(MKL_INCLUDE) $(OPENBLAS_INCLUDE)
#F90INCDIR = -I/usr/include $(MUMPS_INCLUDE) $(MKL_INCLUDE) $(OPENBLAS_INCLUDE)
#F90INCDIR = -I/usr/include $(MUMPS_INCLUDE) $(MKL_INCLUDE) #$(OPENBLAS_INCLUDE)
#F90INCDIR = $(MUMPS_INCLUDE)
F90INCDIR = -I/home/j/jcanton/software/MUMPS_5.0.1/include
# Libraries
LIBARPACK = $(ARPACK_LDFLAGS) $(ARPACK_LIBS)
LIBMKL = $(MKL_LDFLAGS) -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_core -lmkl_gnu_thread
#LIBMUMPS = $(MUMPS_LDFLAGS) -ldmumps -lzmumps -lmumps_common -lpord
LIBMUMPS = -L/home/j/jcanton/software/MUMPS_5.0.1/lib -ldmumps -lzmumps -lmumps_common -lpord
#LIBMPI = -L/lap/openmpi/1.8.8/gcc-4.6/lib
#LIBSCOTCH = $(SCOTCH_LDFLAGS) -lptscotch -lptesmumps -lptscotcherr -lscotch
#LIBBLAS = $(OPENBLAS_LDFLAGS) $(OPENBLAS_LIBS)
#LIBLAPACK = $(LAPACK_LDFLAGS) $(LAPACK_LIBS)
#LIBSCALAPACK = $(SCALAPACK_LDFLAGS) -lscalapack_ompi
#LIBS = $(LIBMUMPS) $(LIBSCOTCH) $(LIBARPACK) $(LIBSCALAPACK) $(LIBMKL) $(LIBLAPACK) $(LIBBLAS) $(LIBMUMPS)
#LIBS = $(LIBMUMPS) $(LIBARPACK) $(LIBSCALAPACK) $(LIBMKL) $(LIBLAPACK) $(LIBBLAS) $(LIBMUMPS)
LIBS = $(LIBMUMPS) $(LIBSCOTCH) $(LIBARPACK) $(LIBMKL)
FOLDER = $(CASEDIR)/
NAME = $(PASTANAME)
###############################################################################
# Rules
.SUFFIXES:
.SUFFIXES: .f90 .o
.f90.o:
$(F90CMP) $(F90FLAGS) $(F90INCDIR) $<