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

Annotation of /MITgcm_contrib/mlosch/optim_m1qn3/Makefile

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


Revision 1.2 - (hide annotations) (download)
Thu May 10 16:10:32 2012 UTC (11 years, 11 months ago) by mlosch
Branch: MAIN
Changes since 1.1: +6 -5 lines
add macro MAKEDEPEND
clean up INCDIRS

1 mlosch 1.2 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/Makefile,v 1.1 2012/04/26 11:10:06 mlosch Exp $
2     # $Name: $
3 mlosch 1.1 #***********************************************************************
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 mlosch 1.2 MAKEDEPEND=makedepend
39    
40 mlosch 1.1 INCLUDEDIRS = -I. \
41 mlosch 1.2 -I../verification/natl_box_adjoint/build
42 mlosch 1.1
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    
54     # -DMAX_INDEPEND=293570968 \
55     # FORTRAN compiler and its flags.
56     # default is gfortran
57     FC = gfortran
58     FFLAGS = -fconvert=big-endian
59    
60     # ifort compilers
61     #FC = ifort
62     #FFLAGS = -mieee-fp -132 -r8 -i4 -W0 -WB -CB -fpe0 -traceback -convert big_endian -assume byterecl
63    
64     # SGI o3k IRIX64
65     #FC = f77
66     #FFLAGS = -extend_source -bytereclen -mips4 -r8 -static
67    
68     # AER cluster
69     #FC = /opt/mpich/bin/mpif77
70     #FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend
71    
72     SMALLF = $(SRC:.F=.$(SUFF))
73     OBJECTS = $(SRC:.F=.o)
74    
75     .SUFFIXES: .o .$(SUFF) .F
76    
77     all: small_f $(EXECUTABLE)
78     $(EXECUTABLE): $(OBJECTS)
79     $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)
80    
81     small_f: $(SMALLF)
82    
83     depend:
84 mlosch 1.2 $(MAKEDEPEND) -o .f $(INCLUDEDIRS) $(SRC)
85 mlosch 1.1
86     # The normal chain of rules is ( .F - .f - .o )
87     .F.f:
88     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
89     .F.for:
90     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
91     .f.o:
92     $(FC) $(FFLAGS) -c $<
93     .for.o:
94     $(FC) $(FFLAGS) -c $<
95    
96     # Cleaning options.
97     clean:
98     -rm -f *.o *.f *.for
99    
100     Clean:
101     @make -f $(MAKEFILE) clean
102     -rm -f OPWARM.*
103    
104     CLEAN:
105     @make -f $(MAKEFILE) Clean
106     -rm -f $(EXECUTABLE)
107    
108     # DO NOT DELETE

  ViewVC Help
Powered by ViewVC 1.1.22