1 |
heimbach |
1.2 |
|
2 |
|
|
#*********************************************************************** |
3 |
|
|
# Makefile for the ECCO off-line large scale optimization. |
4 |
|
|
# |
5 |
|
|
# started: Patrick Heimbach heimbach@mit.edu 19-Jun-2000 |
6 |
|
|
# |
7 |
|
|
# changed: |
8 |
|
|
# |
9 |
|
|
#*********************************************************************** |
10 |
|
|
|
11 |
|
|
# The optimization routines. |
12 |
|
|
SRC = optim_main.F \ |
13 |
|
|
optim_sub.F \ |
14 |
|
|
optim_numbmod.F \ |
15 |
|
|
optim_initmod.F \ |
16 |
|
|
optim_readdata.F \ |
17 |
|
|
optim_writedata.F \ |
18 |
|
|
optim_write_control.F \ |
19 |
mlosch |
1.4 |
xerbla.F \ |
20 |
heimbach |
1.2 |
simul.F |
21 |
|
|
|
22 |
|
|
EXEDIR = ./ |
23 |
|
|
|
24 |
heimbach |
1.3 |
# Location of cpp preprocessor |
25 |
|
|
# default is (Linux) |
26 |
|
|
CPP = cat $< | /lib/cpp -P -traditional |
27 |
heimbach |
1.2 |
# on SUNOS |
28 |
|
|
# CPP = cat $< | /usr/ccs/lib/cpp |
29 |
heimbach |
1.3 |
|
30 |
heimbach |
1.2 |
INCLUDEDIRS = -I. \ |
31 |
heimbach |
1.3 |
-I../verification/natl_box_adjoint/build/ |
32 |
heimbach |
1.2 |
|
33 |
|
|
LIBDIRS = -L. \ |
34 |
heimbach |
1.3 |
-L../lsopt/ |
35 |
heimbach |
1.2 |
|
36 |
|
|
LIBS = -llsopt_ecco \ |
37 |
|
|
-lblas1 |
38 |
|
|
|
39 |
|
|
# OPTMODE is either equal to OFFLINE or ONLINE |
40 |
|
|
OPTMODE = OFFLINE |
41 |
|
|
EXECUTABLE = $(EXEDIR)optim.x |
42 |
|
|
|
43 |
|
|
# The cpp flags. |
44 |
heimbach |
1.3 |
CPPFLAGS = -DREAL_BYTE=4 \ |
45 |
|
|
-DMAX_INDEPEND=1000000 \ |
46 |
|
|
-D_RL='double precision' \ |
47 |
heimbach |
1.8 |
-D_RS='double precision' \ |
48 |
heimbach |
1.3 |
-D$(OPTMODE) |
49 |
heimbach |
1.2 |
|
50 |
heimbach |
1.3 |
# -DMAX_INDEPEND=293570968 \ |
51 |
heimbach |
1.2 |
# FORTRAN compiler and its flags. |
52 |
heimbach |
1.3 |
# default is (Linux) |
53 |
|
|
FC = f77 |
54 |
|
|
|
55 |
heimbach |
1.7 |
# ifort compilers |
56 |
|
|
#FC = ifort |
57 |
|
|
#FFLAGS = -mp -132 -r8 -i4 -w95 -W0 -WB -CB -fpe0 -traceback -convert big_endian -assume byterecl |
58 |
|
|
|
59 |
heimbach |
1.3 |
# SGI o3k IRIX64 |
60 |
|
|
#FC = f77 |
61 |
|
|
#FFLAGS = -extend_source -bytereclen -mips4 -r8 -static |
62 |
|
|
|
63 |
|
|
# AER cluster |
64 |
|
|
#FC = /opt/mpich/bin/mpif77 |
65 |
|
|
#FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend |
66 |
heimbach |
1.2 |
|
67 |
|
|
# File removal. |
68 |
|
|
RM = rm -f |
69 |
|
|
|
70 |
heimbach |
1.3 |
SMALLF = $(SRC:.F=.f) |
71 |
|
|
OBJECTS = $(SRC:.F=.o) |
72 |
|
|
|
73 |
heimbach |
1.2 |
.SUFFIXES: .o .f .F |
74 |
|
|
|
75 |
|
|
all: $(EXECUTABLE) |
76 |
heimbach |
1.3 |
$(EXECUTABLE): $(OBJECTS) |
77 |
|
|
$(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS) |
78 |
|
|
|
79 |
heimbach |
1.2 |
depend: |
80 |
|
|
makedepend -o .f $(INCLUDEDIRS) $(SRC) |
81 |
|
|
|
82 |
|
|
# The normal chain of rules is ( .F - .f - .o ) |
83 |
|
|
.F.f: |
84 |
|
|
$(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@ |
85 |
dfer |
1.5 |
xerbla.f: xerbla.F |
86 |
dfer |
1.6 |
$(CPP) $(INCLUDEDIRS) > $@ |
87 |
heimbach |
1.2 |
.f.o: |
88 |
|
|
$(FC) $(FFLAGS) -c $< |
89 |
|
|
|
90 |
|
|
# Cleaning options. |
91 |
|
|
clean: |
92 |
heimbach |
1.3 |
$(RM) $(EXEDIR)optim.x *.o *.f |
93 |
heimbach |
1.2 |
|
94 |
|
|
scratch: |
95 |
|
|
$(RM) OPWARMD OPWARMI $(EXEDIR)optim.x $(OBJ) |
96 |
|
|
|
97 |
|
|
# DO NOT DELETE |
98 |
|
|
|