3 # This file was automatically generated by the configure script in the
4 # top level directory. You may make changes to the settings in this
5 # file but be aware they will be overwritten each time you run configure.
6 # Ordinarily, it is necessary to run configure once, when the code is
9 # To permanently change options, change the settings for your platform
10 # in the file arch/configure.defaults then rerun configure.
15 .SUFFIXES: .F .i .o .f90 .c
17 #### Get core settings from environment (set in compile script)
18 #### Note to add a core, this has to be added to.
20 COREDEFS = -DEM_CORE=$(WRF_EM_CORE) \
21 -DNMM_CORE=$(WRF_NMM_CORE) -DNMM_MAX_DIM=2600 \
22 -DCOAMPS_CORE=$(WRF_COAMPS_CORE) \
23 -DEXP_CORE=$(WRF_EXP_CORE)
25 #### Single location for defining total number of domains. You need
26 #### at least 1 + 2*(number of total nests). For example, 1 coarse
27 #### grid + three fine grids = 1 + 2(3) = 7, so MAX_DOMAINS=7.
31 #### DM buffer length for the configuration flags.
33 CONFIG_BUF_LEN = 16384
36 ##############################################################################
37 #### The settings in this section are defaults that may be overridden by the
38 #### architecture-specific settings in the next section.
39 ##############################################################################
41 ##############################################################################
42 #### NOTE: Do not modify these default values here. To override these
43 #### values, make changes after "Architecture specific settings".
44 ##############################################################################
46 #### Native size (in bytes) of Fortran REAL data type on this architecture ####
47 #### Note: to change real wordsize (for example, to promote REALs from
48 #### 4-byte to 8-byte), modify the definition of RWORDSIZE in the
49 #### section following "Architecture specific settings". Do not
50 #### change NATIVE_RWORDSIZE as is it architecture-specific.
53 #### Default sed command and script for Fortran source files ####
54 SED_FTN = sed -f ../arch/standard.sed
56 # Hack to work around $(PWD) not changing during OSF1 build.
57 # $(IO_GRIB_SHARE_DIR) is reset during the OSF1 build only.
60 #### ESMF switches ####
61 #### These are set up by Config.pl ####
62 # switch to use separately installed ESMF library for coupling: 1==true
64 # select dependences on module_utility.o
65 ESMF_MOD_DEPENDENCE = ../external/esmf_time_f90/module_utility.o
66 # select -I options for separately installed ESMF library, if present
68 # select -I options for external/io_esmf vs. external/esmf_time_f90
69 ESMF_IO_INC = -I../external/esmf_time_f90
70 # select cpp token for external/io_esmf vs. external/esmf_time_f90
72 # select build target for external/io_esmf vs. external/esmf_time_f90
73 ESMF_TARGET = esmf_time
75 ##############################################################################
78 #### Architecture specific settings ####
80 # Settings for Darwin (single-threaded, no nesting, USES: gcc-3.3, xlf cpp, SystemStubs)
82 # Using -qfloat=nomaf option can result in identical results with
83 # non-optimized and optimized results (suggested by Fovell of UCLA)
84 # One may turn on by uncommenting it in FCOPTIM line
92 RWORDSIZE = $(NATIVE_RWORDSIZE)
93 PROMOTION = -qrealsize=$(RWORDSIZE) -qintsize=4
94 CFLAGS = -DNOUNDERSCORE -DLANDREAD_STUB -I /usr/include/sys -DMACOS
95 FCOPTIM = #-O3 -qarch=auto #-qfloat=nomaf
96 FCDEBUG = #-qnoopt -qfullpath
97 FCBASEOPTS = -qsave $(FCDEBUG) -qmaxmem=32767 -qspillsize=32767 -w
98 FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)
99 FCSUFFIX = -qsuffix=f=f90
100 # machine-specific flags needed to link in ESMF library (C++ run-time-library, etc.)
102 ESMF_IO_LIB = -L../external/esmf_time_f90 -lesmf_time
103 ESMF_IO_LIB_EXT = -L../../external/esmf_time_f90 -lesmf_time
104 INCLUDE_MODULES = -I../external/io_netcdf -I../external/io_int -I../external/esmf_time_f90 \
105 -I../frame -I../share -I../phys -I../inc -I../chem
106 ARCHFLAGS = $(COREDEFS) -DGRIB1 -DINTIO -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=$(RWORDSIZE) -DLWORDSIZE=4 \
108 -DLIMIT_ARGS -DNO_NAMELIST_PRINT -DLANDREAD_STUB -DMAC_KLUDGE
109 # -DLIMIT_ARGS -DNO_NAMELIST_PRINT -DNATIVE_MASSV -DMACOS
112 #LIB = -L../external/io_netcdf -lwrfio_nf -L/usr/local/netcdf-xlf/lib -lnetcdf -lmass -lmassv
113 LIB = -L../external/io_netcdf -lwrfio_nf -L/usr/local/netcdf-xlf/lib -lnetcdf \
114 -L../external/io_int -lwrfio_int \
115 -L../external/io_grib1 -lio_grib1 \
117 -L../external/io_grib_share -lio_grib_share \
118 ../frame/module_internal_header_util.o ../frame/pack_utils.o -L../external/esmf_time_f90 -lesmf_time
120 LDFLAGS = -Wl,-stack_size,10000000,-stack_addr,0xc0000000 -L/usr/lib -lSystemStubs
123 CPP = /opt/ibmcmp/xlf/8.1/exe/cpp -C -P
124 #CPP = /usr/bin/cpp -C -P -xassembler-with-cpp
125 POUND_DEF = -DNONSTANDARD_SYSTEM -DCONFIG_BUF_LEN=$(CONFIG_BUF_LEN) -DMAX_DOMAINS_F=$(MAX_DOMAINS)
126 CPPFLAGS = -I$(LIBINCLUDE) -C -P $(ARCHFLAGS) $(COREDEFS) $(ENVCOMPDEFS) $(POUND_DEF)
130 NETCDFPATH = /usr/local/netcdf-xlf
133 externals : wrf_ioapi_includes wrfio_nf wrfio_grib_share wrfio_grib1 wrfio_int module_dm.F esmf_time
136 ( /bin/cp module_dm_warning module_dm.F ; cat module_dm_stubs.F >> module_dm.F )
139 ( cd ../external/io_netcdf ; make NETCDFPATH=/usr/local/netcdf-xlf RANLIB="$(RANLIB)" CPP="$(CPP)" FC="$(FC) $(PROMOTION) $(FCDEBUG) -qarch=auto -qzerosize" )
142 ( cd ../external/io_int ; \
143 make CC="$(CC)" RANLIB="$(RANLIB)" CPP="$(CPP)" SFC="$(SFC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" FC="$(FC) $(PROMOTION) $(FCDEBUG) -qarch=auto -qzerosize" all )
146 ( cd ../external/io_grib_share ; \
147 make CC="$(SCC)" CFLAGS="$(CFLAGS)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCSUFFIX) -qarch=auto -qzerosize" archive)
150 ( cd ../external/io_grib1 ; \
151 make CC="$(SCC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" CPP="$(CPP)" FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCSUFFIX) -qarch=auto -qzerosize" archive)
154 ( cd ../external/io_grib2 ; \
155 make CC="$(SCC)" CFLAGS="$(CFLAGS) -qcpluscmt" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" FC="$(SFC) $(PROMOTION) $(FCDEBUG) $(FCSUFFIX) -qarch=auto -qzerosize" FREE="" FIXED="-qfixed" archive)
158 ( cd ../external/esmf_time_f90 ; \
159 make FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP) -I../../inc -I. $(POUND_DEF)" )
161 solve_interface.o : solve_interface.F
163 $(CPP) -I../inc $(CPPFLAGS) $*.F > $*.f90
164 $(FC) -c -qfree=f90 -qspillsize=32767 -I. $(PROMOTION) $(MODULE_DIRS) $(FCSUFFIX) $*.f90
166 # compile these without high optimization to speed compile
167 shift_domain_em.o : shift_domain_em.F
168 module_io_mm5.o : module_io_mm5.F
169 module_si_io.o : module_si_io.F
170 module_io_wrf.o : module_io_wrf.F
171 module_domain.o : module_domain.F
172 module_start.o : module_start.F
173 module_initialize.o : module_initialize.F
174 module_initialize_b_wave.o : module_initialize_b_wave.F
175 module_initialize_hill2d_x.o : module_initialize_hill2d_x.F
176 module_initialize_quarter_ss.o : module_initialize_quarter_ss.F
177 module_initialize_squall2d_x.o : module_initialize_squall2d_x.F
178 module_initialize_squall2d_y.o : module_initialize_squall2d_y.F
179 module_initialize_real.o : module_initialize_real.F
180 module_dm.o : module_dm.F
181 start_domain.o : start_domain.F
182 solve_em.o : solve_em.F
183 mediation_interp_domain.o : mediation_interp_domain.F
184 mediation_force_domain.o : mediation_force_domain.F
185 mediation_feedback_domain.o : mediation_feedback_domain.F
186 convert_nmm.o : convert_nmm.F
187 module_configure.o : module_configure.F
189 module_io_mm5.o module_si_io.o module_io_wrf.o module_domain.o \
190 module_start.o module_initialize.o module_initialize_b_wave.o \
191 module_initialize_hill2d_x.o module_initialize_quarter_ss.o \
192 module_initialize_squall2d_x.o module_initialize_squall2d_y.o \
193 module_initialize_real.o module_dm.o \
195 mediation_interp_domain.o \
200 $(SED_FTN) $*.F > $*.b
201 $(CPP) -I../inc $(CPPFLAGS) $*.b > $*.f90
203 $(FC) -c $(PROMOTION) $(FCBASEOPTS) $(MODULE_DIRS) $(FCSUFFIX) $*.f90
205 ###########################################################
207 # These sub-directory builds are identical across all architectures
209 ( cd ../external/io_esmf ; \
210 make FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS) $(ESMF_MOD_INC)" RANLIB="$(RANLIB)" CPP="$(CPP) $(POUND_DEF) " )
214 # Macros, these should be generic for all machines
220 # There is probably no reason to modify these rules
223 ( cd ../external/ioapi_share ; \
224 $(MAKE) NATIVE_RWORDSIZE="$(NATIVE_RWORDSIZE)" RWORDSIZE="$(RWORDSIZE)" )
228 $(CPP) -I../inc $(CPPFLAGS) $*.F > $@
229 mv $*.i $(DEVTOP)/pick/$*.f90
230 cp $*.F $(DEVTOP)/pick
234 $(SED_FTN) $*.F > $*.b
235 $(CPP) -I../inc $(CPPFLAGS) $*.b > $*.f90
237 $(FC) -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
238 #PGI if [ ! -e $@ ] ; then \
239 #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \
241 #PGI if [ ! -e $@ ] ; then \
242 #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \
247 $(SED_FTN) $*.F > $*.b
248 $(CPP) -I../inc $(CPPFLAGS) $*.b > $@
253 $(FC) -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90
254 #PGI if [ ! -e $@ ] ; then \
255 #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \
257 #PGI if [ ! -e $@ ] ; then \
258 #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \
263 $(CC) -c $(CFLAGS) $*.c