-
Notifications
You must be signed in to change notification settings - Fork 37
/
common.mk
127 lines (108 loc) · 4.46 KB
/
common.mk
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# For inclusion in makefile for use with GNU make (gmake)
#
# Purpose: Modify to local configuration by user.
#
# Program name
PROGNAME = OceanWave3D
LIBNAME = libOceanWave3D_botp.so
# Installation directory
INSTALLDIR = $(HOME)/bin
LIBINSTALLDIR = $(HOME)/lib
# Build directory where object files are stored
BUILDDIR = $(PWD)/build
# The build environment is set either by the choice of a compiler
# flag, or by creating a block for a specific $USER.
# Choose the Fortran compiler on this system
# E.g. pathf90, f90, gfortran, gf90, ifort
#FC = gfortran
#FC = gfortran44
#FC = gfortran-4.4
#FC = gf90
USER = hbb
# First the blocks based on compiler name:
ifeq ($(FC),gfortran44)
# gbar linux machines
LIBDIRS = -L $(HOME)/lib/
LINLIB = -lharwell -lskit -llapack -lblas
DBFLAGS = -pg -g -O0 -fbounds-check -ffpe-trap=invalid,zero,overflow -ffree-line-length-none
OPTFLAGS = -O3 -ffpe-trap=invalid,zero,overflow -ffree-line-length-none
endif
ifeq ($(FC),ifort)
# hbb work machine with intel compiler
LIBDIRS = -L/usr/local/lib/
LINLIB = -lharwell_intel -lskit_intel -llapack_intel -lblas_intel
DBFLAGS = -g -CB -fpe0 -fpstkchk -traceback
OPTFLAGS = -O3 -tpp7
# OPTFLAGS = -g -fast
endif
ifeq ($(FC),gfortran)
# MacOS, apek
LIBDIRS = -L $(HOME)/lib/
# -L/Users/apek/Documents/Fortran/Harwell/lib -L/usr/local/atlas/lib -L/Users/apek/Documents/Fortran/SPARSKIT2
# LINLIB = -lharwell -lskit -latlas -llapack -l_VTK_IO
# LINLIB = -lharwell -lskit -latlas -l_VTK_IO -framework veclib
LINLIB = -lharwell -lskit -latlas -framework veclib
DBFLAGS = -pg -g -O -fcheck=all -ffpe-trap=invalid,zero,overflow
OPTFLAGS = -O2
endif
ifeq ($(FC),pathf90)
# Niflheim cluster, DTU, apek
LIBDIRS = -L/opt/acml3.5.0/pathscale64/lib -L$(HOME)/lib
LINLIB = -lharwellFPATH90 -lskitPATHF90 -llinpackPATHF90 -lacml
DBFLAGS = -pg -g -O -static -woffoptions
OPTFLAGS = -O2 -static -woffoptions -ffortran-bounds-check
endif
ifeq ($(FC),f90)
# gbar, DTU, apek
LIBDIRS = -L$(HOME)/lib/
LINLIB = -lharwell -lskit -xlic_lib=sunperf
DBFLAGS = -pg -g -O0 # -static -woffoptions
OPTFLAGS = -O -fast
# OPTFLAGS = -g -fast
endif
# Then the blocks for specific users (this clobbers the above info.)
ifeq ($(USER),hbb)
# hbb machine, gfortran
FC=gfortran
LIBDIRS = -L $(HOME)/lib/
LINLIB = -lharwell -lskit -llapack -lblas
DBFLAGS = -pg -g -fbounds-check -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fno-automatic
OPTFLAGS = -pg -O3 -ffree-line-length-none -fno-automatic -ffpe-trap=invalid,zero,overflow
# OPTFLAGS = -g -fast
endif
ifeq ($(USER),botp-dev)
# botp kubuntu, 10.04-64bit
FC = gfortran
LIBDIRS = -L$(HOME)/lib/
LINLIB = -lharwell_gfortran -ltmglib_gfortran -llapack_gfortran -lblas -lskit_gfortran
DBFLAGS = -pg -g -O0 -fPIC -fbounds-check -ffpe-trap=invalid,zero,overflow -ffree-line-length-none
OPTFLAGS = -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all
SHLIBFLAGS = -shared -O2 -fPIC -fbounds-check -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all
endif
ifeq ($(USER),olli)
# olli linux machine
FC = gfortran
LIBDIRS = -L$(HOME)/lib/ -Ldep/SPARSKIT2/ -Ldep/Harwell/
LINLIB = -lharwell -lskit -llapack -lblas
DBFLAGS = -pg -g -O0 -fbounds-check -ffpe-trap=invalid,zero,overflow -ffree-line-length-none
OPTFLAGS = -O3 -ffpe-trap=invalid,zero,overflow -ffree-line-length-none
endif
ifeq ($(USER),gudu)
# gudu linux machine
FC = ifort
LIBDIRS = -L$(HOME)/lib/
LINLIB = -lharwell -lskit -llapack -lblas
DBFLAGS = -O0 -traceback -check all -warn all
OPTFLAGS = -O3 -xHOST -ipo -ip
endif
ifeq ($(USER),apek)
# MacOS, apek
FC = gfortran
LIBDIRS = -L $(HOME)/lib/
# -L/Users/apek/Documents/Fortran/Harwell/lib -L/usr/local/atlas/lib -L/Users/apek/Documents/Fortran/SPARSKIT2
# LINLIB = -lharwell -lskit -latlas -llapack -l_VTK_IO
# LINLIB = -lharwell -lskit -latlas -l_VTK_IO -framework veclib
LINLIB = -lharwell -lskit -latlas -framework veclib
DBFLAGS = -pg -g -O -fcheck=all -ffpe-trap=invalid,zero,overflow
OPTFLAGS = -O2
endif