Newer
Older
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
# Define our compilers...
#
# on rMBP the defaults are OpenMPI (1.4.5),
# built with the Intel compilers
#MPI_HOME=/usr/local/openmpi/intel
MPI_HOME=/usr/local/openmpi_1.4.5/intel
F90 = $(MPI_HOME)/bin/mpif90
F77 = $(MPI_HOME)/bin/mpif90
CC = $(MPI_HOME)/bin/mpicc
# we take the standard ar
# AR=ar
AR=xiar
# There are no BITS
BITS=_v0.2a-intel_13.0.1-openmpi_1.4.5
# no MKL
# IMKL = /scinet/gpc/intel/Compiler/11.1/056/mkl/include
# IMKL = /scinet/gpc/intel/Compiler/11.1/072/mkl/include
# INCLUDE=-I$(IMKL)
# Define MPI include files for ifort.
# these should match the build of wsmp; see below.
# for openmpi, these work
#MPI_INC=-I /usr/local/openmpi/intel/include
#MPI_LIB=-L/usr/local/openmpi/intel/lib -lmpi -lmpi_f77 -lmpi_f90
#INCLUDE = $(MPI_INC)
# Define FORTRAN compiler flags.......................
#
#GFORTRAN_FLAGS = -ffree-line-length-0
# This gives us, at run time,
# error while loading shared libraries: libimf.so: cannot open shared object file
# No such file or directory
# IFORT_FLAGS = -O2 -fp-model strict -mcmodel=large -shared-intel
# IFORT_FLAGS = -fast
#IFORT_FLAGS = -O2 -heap-arrays 10
IFORT_FLAGS = -O0 -heap-arrays 10
#IFORT_DEBUG = -g -warn all -check all -debug all
#F90_DEBUG = -g -warn all -check all -debug all -check:noarg_temp_created -traceback
F90_DEBUG = -g -traceback
#F90_DEBUG =
#F77_DEBUG = -g -warn all -check all -debug all -traceback
F77_DEBUG = -g -traceback
#F77_DEBUG =
#IFORT_DEBUG =
#F90FLAGS = ${IFORT_FLAGS} ${IFORT_DEBUG}
#F77FLAGS = ${IFORT_FLAGS} ${IFORT_DEBUG}
F90FLAGS = ${IFORT_FLAGS} ${F90_DEBUG}
F77FLAGS = ${IFORT_FLAGS} ${F77_DEBUG}
FFLAGS=${F90FLAGS}
# Define C compiler flags.............................
#
ICC_FLAGS =
CFLAGS = -O0 ${ICC_FLAGS}
#CFLAGS = -O2 ${ICC_FLAGS}
# no Intel MKL library
#
# LMKL = /scinet/gpc/intel/Compiler/11.1/056/mkl/lib
# LMKL = /scinet/gpc/intel/Compiler/11.1/072/mkl/lib
# MPI libraries
# (use the default)
# MPI
MPI = -L$(MPI_HOME)/lib -lmpi
# WSMP Library
#
# wsmp, with gnu and openMPI
# WSMP = -L/opt/wsmp/wsmp-Linux64/lib/GNU/openmpi -lpwsmp64
# wsmp, with intel and mpich2
WSMP = -L/Users/whipp/Research/Modeling/Source/wsmp/wsmp-MacOS/lib/Intel+OpenMPI -lpwsmp64
# Not using Google's TCMalloc
# TCML = /home/dwhipp/software/tcml
LIBS = \
-LOCTREE -lOctree$(BITS) \
-LNN -lnn_f$(BITS) \
-LNN -lnn_c$(BITS) \
-LCASCADE -lcascade$(BITS) \
-LRESAMPLE -lresample$(BITS) \
$(WSMP) -lblas \
$(MPI) \
-lpthread
# $(MPI_LIB) \
# The Makefiles look at compile output with this
PAGER=more
# compile rules.......................................
#
COMPILE_OUT=$(NAME)$(BITS).compile
.SUFFIXES:
.SUFFIXES: .o .c .f .f90
.f90.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(F90) $(F90FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
$(F90) $(F90FLAGS) $(INCLUDE) -c $< >>$(COMPILE_OUT) 2>&1
.f.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(F77) $(F77FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
$(F77) $(F77FLAGS) $(INCLUDE) -c $< >>$(COMPILE_OUT) 2>&1
.c.o:
@echo "--" >>$(COMPILE_OUT) 2>&1
@echo "$(CC) $(CFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
$(CC) $(CFLAGS) -c $< >>$(COMPILE_OUT) 2>&1