/[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.4 - (show annotations) (download)
Mon May 9 09:36:00 2016 UTC (7 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +7 -28 lines
reorder rules and fix a suffix issue so the compiling on MacOS is less painful

1 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/Makefile,v 1.3 2012/09/07 19:57:46 heimbach 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:
77 .SUFFIXES: .o .$(SUFF) .F
78
79 all: small_f $(EXECUTABLE)
80 $(EXECUTABLE): $(OBJECTS)
81 $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)
82
83 small_f: $(SMALLF)
84
85 depend:
86 $(MAKEDEPEND) -o .$(SUFF) $(INCLUDEDIRS) $(SRC)
87
88 # The normal chain of rules is ( .F - .f - .o )
89 .F.for:
90 $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
91 .for.o:
92 $(FC) $(FFLAGS) -c $<
93 .F.f:
94 $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
95 .f.o:
96 $(FC) $(FFLAGS) -c $<
97
98 # Cleaning options.
99 clean:
100 -rm -f *.o *.f *.for
101
102 Clean:
103 @make -f $(MAKEFILE) clean
104 -rm -f OPWARM.*
105
106 CLEAN:
107 @make -f $(MAKEFILE) Clean
108 -rm -f $(EXECUTABLE)
109
110 # DO NOT DELETE
111

  ViewVC Help
Powered by ViewVC 1.1.22