/[MITgcm]/MITgcm_contrib/mlosch/optim_m1qn3/Makefile
ViewVC logotype

Contents of /MITgcm_contrib/mlosch/optim_m1qn3/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Fri Sep 7 19:57:46 2012 UTC (11 years, 7 months ago) by heimbach
Branch: MAIN
Changes since 1.2: +27 -3 lines
Add CPPFLAG -D_d='d' to makefile (now required for EEPARAMS.h)

1 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/Makefile,v 1.2 2012/05/10 16:10:32 mlosch Exp $
2 # $Name: $
3 #***********************************************************************
4 # Makefile for the off-line large scale optimization with m1qn3
5 # in reverse communication mode.
6 #
7 # started: Martin Losch Martin.Losch@awi.de 24-Apr-2012
8 #
9 # changed:
10 #
11 #***********************************************************************
12
13 MAKEFILE=Makefile
14 # The optimization routines.
15 SRC = optim_main.F \
16 optim_sub.F \
17 optim_readparms.F \
18 optim_readdata.F \
19 optim_writedata.F \
20 optim_store_m1qn3.F \
21 m1qn3_offline.F \
22 ddot.F
23
24 EXEDIR = .
25
26 # default suffix for pre-processed fortran files is f
27 SUFF=f
28 # for case-insensitive file systems you may need this
29 # SUFF=for
30 # Location of cpp preprocessor
31 # default is (Linux)
32 CPP = cat $< | /lib/cpp -P -traditional
33 # Mac OS X
34 # CPP = cat $< | /usr/bin/cpp -P -traditional
35 # on SUNOS
36 # CPP = cat $< | /usr/ccs/lib/cpp
37
38 MAKEDEPEND=makedepend
39
40 INCLUDEDIRS = -I. \
41 -I../../../MITgcm/verification/tutorial_global_oce_optim/build
42
43 LIBDIRS =
44 LIBS =
45
46 EXECUTABLE = $(EXEDIR)/optim.x
47
48 # The cpp flags.
49 CPPFLAGS = -DREAL_BYTE=4 \
50 -DMAX_INDEPEND=1000000 \
51 -D_RL='double precision' \
52 -D_RS='double precision' \
53 -D_d='d'
54
55 # -DMAX_INDEPEND=293570968 \
56 # FORTRAN compiler and its flags.
57 # default is gfortran
58 FC = gfortran
59 FFLAGS = -fconvert=big-endian
60
61 # ifort compilers
62 #FC = ifort
63 #FFLAGS = -mieee-fp -132 -r8 -i4 -W0 -WB -CB -fpe0 -traceback -convert big_endian -assume byterecl
64
65 # SGI o3k IRIX64
66 #FC = f77
67 #FFLAGS = -extend_source -bytereclen -mips4 -r8 -static
68
69 # AER cluster
70 #FC = /opt/mpich/bin/mpif77
71 #FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend
72
73 SMALLF = $(SRC:.F=.$(SUFF))
74 OBJECTS = $(SRC:.F=.o)
75
76 .SUFFIXES: .o .$(SUFF) .F
77
78 all: small_f $(EXECUTABLE)
79 $(EXECUTABLE): $(OBJECTS)
80 $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)
81
82 small_f: $(SMALLF)
83
84 depend:
85 $(MAKEDEPEND) -o .f $(INCLUDEDIRS) $(SRC)
86
87 # The normal chain of rules is ( .F - .f - .o )
88 .F.f:
89 $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
90 .F.for:
91 $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
92 .f.o:
93 $(FC) $(FFLAGS) -c $<
94 .for.o:
95 $(FC) $(FFLAGS) -c $<
96
97 # Cleaning options.
98 clean:
99 -rm -f *.o *.f *.for
100
101 Clean:
102 @make -f $(MAKEFILE) clean
103 -rm -f OPWARM.*
104
105 CLEAN:
106 @make -f $(MAKEFILE) Clean
107 -rm -f $(EXECUTABLE)
108
109 # DO NOT DELETE
110
111 optim_sub.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ECCO_CPPOPTIONS.h
112 optim_sub.f: ../../../tmp3/MITgcm/verification/lab_sea/build/EEPARAMS.h
113 optim_sub.f: ../../../tmp3/MITgcm/verification/lab_sea/build/SIZE.h
114 optim_sub.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ctrl.h optim.h
115 optim_sub.f: m1qn3_common.h
116 optim_readparms.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ECCO_CPPOPTIONS.h
117 optim_readparms.f: ../../../tmp3/MITgcm/verification/lab_sea/build/EEPARAMS.h
118 optim_readparms.f: ../../../tmp3/MITgcm/verification/lab_sea/build/SIZE.h
119 optim_readparms.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ctrl.h
120 optim_readparms.f: optim.h
121 optim_readdata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ECCO_CPPOPTIONS.h
122 optim_readdata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/EEPARAMS.h
123 optim_readdata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/SIZE.h
124 optim_readdata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ctrl.h
125 optim_readdata.f: optim.h
126 optim_writedata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ECCO_CPPOPTIONS.h
127 optim_writedata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/EEPARAMS.h
128 optim_writedata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/SIZE.h
129 optim_writedata.f: ../../../tmp3/MITgcm/verification/lab_sea/build/ctrl.h
130 optim_writedata.f: optim.h
131 optim_store_m1qn3.f: m1qn3_common.h m1qn3a_common.h mlis3_common.h
132 m1qn3_offline.f: m1qn3_common.h m1qn3a_common.h mlis3_common.h

  ViewVC Help
Powered by ViewVC 1.1.22