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 -DDA_CORE=$(WRF_DA_CORE) \
24 -DEXP_CORE=$(WRF_EXP_CORE)
26 #### Single location for defining total number of domains. You need
27 #### at least 1 + 2*(number of total nests). For example, 1 coarse
28 #### grid + three fine grids = 1 + 2(3) = 7, so MAX_DOMAINS=7.
32 #### DM buffer length for the configuration flags.
34 CONFIG_BUF_LEN = 32768
37 ##############################################################################
38 #### The settings in this section are defaults that may be overridden by the
39 #### architecture-specific settings in the next section.
40 ##############################################################################
42 ##############################################################################
43 #### NOTE: Do not modify these default values here. To override these
44 #### values, make changes after "Architecture specific settings".
45 ##############################################################################
47 #### Native size (in bytes) of Fortran REAL data type on this architecture ####
48 #### Note: to change real wordsize (for example, to promote REALs from
49 #### 4-byte to 8-byte), modify the definition of RWORDSIZE in the
50 #### section following "Architecture specific settings". Do not
51 #### change NATIVE_RWORDSIZE as is it architecture-specific.
54 #### Default sed command and script for Fortran source files ####
55 #SED_FTN = sed -f $(WRF_SRC_ROOT_DIR)/arch/standard.sed
56 SED_FTN = $(WRF_SRC_ROOT_DIR)/tools/standard.exe
58 # Hack to work around $(PWD) not changing during OSF1 build.
59 # $(IO_GRIB_SHARE_DIR) is reset during the OSF1 build only.
62 #### ESMF switches ####
63 #### These are set up by Config.pl ####
64 # switch to use separately installed ESMF library for coupling: 1==true
66 # select dependences on module_utility.o
67 ESMF_MOD_DEPENDENCE = $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/module_utility.o
68 # select -I options for external/io_esmf vs. external/esmf_time_f90
69 ESMF_IO_INC = -I$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90
70 # select -I options for separately installed ESMF library, if present
71 ESMF_MOD_INC = $(ESMF_IO_INC)
72 # select cpp token for external/io_esmf vs. external/esmf_time_f90
74 # select build target for external/io_esmf vs. external/esmf_time_f90
75 ESMF_TARGET = esmf_time
77 ##############################################################################
79 LIBWRFLIB = libwrflib.a
82 #### Architecture specific settings ####
84 # To enable over-decompostion with dmpar and dm+sm compiles,
85 # add -DALLOW_OVERDECOMP to ARCH_LOCAL, below. (not recommended)
87 # Settings for Linux x86_64, PGI compiler with gcc (dmpar)
94 DM_FC = mpif90 -f90=$(SFC)
95 DM_CC = mpicc -cc=$(SCC) -DMPI2_SUPPORT
97 CC = $(DM_CC) -DFSEEKO64_OK
99 RWORDSIZE = $(NATIVE_RWORDSIZE)
100 PROMOTION = -r$(RWORDSIZE) -i4
101 ARCH_LOCAL = -DNONSTANDARD_SYSTEM
102 CFLAGS_LOCAL = -w -O3
105 ESMF_LDFLAG = $(CPLUSPLUSLIB)
106 FCOPTIM = # -fastsse -Mvect=noaltcode -Msmartalloc -Mprefetch=distance:8 -Mfprelaxed # -Minfo=all =Mneginfo=all
107 FCREDUCEDOPT = $(FCOPTIM)
109 FCDEBUG = -g $(FCNOOPT)
110 FORMAT_FIXED = -Mfixed
113 BYTESWAPIO = -byteswapio
114 FCBASEOPTS = -w $(FCDEBUG) $(FORMAT_FREE) $(BYTESWAPIO)
115 MODULE_SRCH_FLAG = -module $(WRF_SRC_ROOT_DIR)/main
116 TRADFLAG = -traditional
124 ###########################################################
125 ######################
127 ARCHFLAGS = $(COREDEFS) -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=$(RWORDSIZE) -DLWORDSIZE=4 \
142 -DCONFIG_BUF_LEN=$(CONFIG_BUF_LEN) \
143 -DMAX_DOMAINS_F=$(MAX_DOMAINS) \
144 -DNMM_NEST=$(WRF_NMM_NEST)
145 CFLAGS = $(CFLAGS_LOCAL) -DDM_PARALLEL
146 FCFLAGS = $(FCOPTIM) $(FCBASEOPTS) $(OMP)
148 ESMF_IO_LIB = $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/libesmf_time.a
149 ESMF_IO_LIB_EXT = -L$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/libesmf_time.a
150 INCLUDE_MODULES = $(MODULE_SRCH_FLAG) \
151 $(ESMF_MOD_INC) $(ESMF_LIB_FLAGS) \
152 -I$(WRF_SRC_ROOT_DIR)/main \
153 -I$(WRF_SRC_ROOT_DIR)/external/io_netcdf \
154 -I$(WRF_SRC_ROOT_DIR)/external/io_int \
155 -I$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 \
156 -I$(WRF_SRC_ROOT_DIR)/frame \
157 -I$(WRF_SRC_ROOT_DIR)/share \
158 -I$(WRF_SRC_ROOT_DIR)/phys \
159 -I$(WRF_SRC_ROOT_DIR)/chem -I$(WRF_SRC_ROOT_DIR)/inc \
165 -L$(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5 -lfftpack \
166 -L$(WRF_SRC_ROOT_DIR)/external/io_grib1 -lio_grib1 \
167 -L$(WRF_SRC_ROOT_DIR)/external/io_grib_share -lio_grib_share \
168 -L$(WRF_SRC_ROOT_DIR)/external/io_int -lwrfio_int \
169 -L$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 -lesmf_time \
171 $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a \
172 $(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
173 $(WRF_SRC_ROOT_DIR)/frame/pack_utils.o
176 $(WRF_SRC_ROOT_DIR)/external/io_netcdf/libwrfio_nf.a -L/home/svm/software/netcdf-3.6.1/lib -lnetcdf \
179 -L$(WRF_SRC_ROOT_DIR)/external/io_mcel -lwrfio_mcel -L$(MCEL_HOME)/MCELSystem/MCEL -lMCEL -L$(MCEL_HOME)/lib \
180 -lomniORB4 -lomnithread -lomniDynamic4 -lm -lc -lpthread -lnetcdf -lnetcdf_c++
182 LIB = $(LIB_BUNDLED) $(LIB_EXTERNAL) $(LIB_LOCAL)
183 LDFLAGS = $(OMP) $(FCFLAGS) $(LDFLAGS_LOCAL)
186 CPPFLAGS = $(ARCHFLAGS) $(ENVCOMPDEFS) -I$(LIBINCLUDE) $(TRADFLAG)
187 NETCDFPATH = $(MCEL_HOME)
190 bundled: wrf_ioapi_includes wrfio_grib_share wrfio_grib1 wrfio_int esmf_time fftpack
191 external: wrfio_nf wrfio_mcel $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a gen_comms_rsllite module_dm_rsllite $(ESMF_TARGET)
193 ######################
194 externals: bundled external
197 ( /bin/rm -f $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c )
200 ( if [ ! -e module_dm.F ] ; then /bin/cp module_dm_warning module_dm.F ; cat module_dm_stubs.F >> module_dm.F ; fi )
203 ( if [ ! -e $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ] ; then \
204 /bin/cp $(WRF_SRC_ROOT_DIR)/tools/gen_comms_warning $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ; \
205 cat $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/gen_comms.c >> $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ; fi )
208 ( if [ ! -e module_dm.F ] ; then /bin/cp module_dm_warning module_dm.F ; \
209 cat $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/module_dm.F >> module_dm.F ; fi )
212 ( cd $(WRF_SRC_ROOT_DIR)/external/io_netcdf ; \
213 make NETCDFPATH="$(NETCDFPATH)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
214 CC="$(SCC)" CFLAGS="$(CFLAGS)" \
215 FC="$(SFC) $(PROMOTION) $(FCFLAGS)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
218 ( cd $(WRF_SRC_ROOT_DIR)/external/io_pnetcdf ; \
219 make NETCDFPATH="$(PNETCDFPATH)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
220 FC="$(FC) $(PROMOTION) $(FCFLAGS)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
223 ( cd $(WRF_SRC_ROOT_DIR)/external/io_grib_share ; \
224 make CC="$(SCC)" CFLAGS="$(CFLAGS)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
225 FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" archive)
228 ( cd $(WRF_SRC_ROOT_DIR)/external/io_grib1 ; \
229 make CC="$(SCC)" CFLAGS="$(CFLAGS)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
230 FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" archive)
233 ( cd $(WRF_SRC_ROOT_DIR)/external/io_grib2 ; \
234 make CC="$(SCC)" CFLAGS="$(CFLAGS) " RM="$(RM)" RANLIB="$(RANLIB)" \
236 FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="-traditional" AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
237 FIXED="$(FORMAT_FIXED)" archive)
240 ( cd ../external/io_mcel ; \
241 make CC="$(CC)" FC="$(SFC) $(PROMOTION) $(FCFLAGS)" CPP="$(CPP)" TRADFLAG="$(TRADFLAG)" \
242 INCL="-I../../inc -I../io_netcdf -I../../frame -I../../share -I../ioapi_share -I$(MCEL_HOME)/MCELSystem/MCEL" all )
245 ( cd $(WRF_SRC_ROOT_DIR)/external/io_int ; \
246 make CC="$(CC)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
247 FC="$(SFC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" \
248 TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" all )
251 ( cd $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 ; \
252 make FC="$(SFC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
253 CPP="$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc -I. $(ARCHFLAGS) $(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
256 ( cd $(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5 ; \
257 make FC="$(SFC)" FFLAGS="$(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
259 $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a :
260 ( cd $(WRF_SRC_ROOT_DIR)/external/RSL_LITE ; make CC="$(CC) $(CFLAGS)" \
261 FC="$(FC) $(FCFLAGS) $(PROMOTION) $(BYTESWAPIO)" \
262 CPP="$(CPP) -I. $(ARCHFLAGS) $(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ;\
263 $(RANLIB) $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a )
265 ######################
266 # Macros, these should be generic for all machines
273 # These sub-directory builds are identical across all architectures
276 ( cd $(WRF_SRC_ROOT_DIR)/external/ioapi_share ; \
277 $(MAKE) NATIVE_RWORDSIZE="$(NATIVE_RWORDSIZE)" RWORDSIZE="$(RWORDSIZE)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
280 ( cd $(WRF_SRC_ROOT_DIR)/external/io_esmf ; \
281 make FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS) $(ESMF_MOD_INC)" \
282 RANLIB="$(RANLIB)" CPP="$(CPP) $(POUND_DEF) " AR="$(AR)" ARFLAGS="$(ARFLAGS)" )
284 # There is probably no reason to modify these rules
288 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.F > $@
289 mv $*.i $(DEVTOP)/pick/$*.f90
290 cp $*.F $(DEVTOP)/pick
294 $(SED_FTN) $*.F > $*.b
295 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.b > $*.f90
297 $(FC) -o $@ -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
301 $(SED_FTN) $*.F > $*.b
302 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.b > $@
307 $(FC) -o $@ -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90
311 $(CC) -o $@ -c $(CFLAGS) $*.c
313 # compile these without high optimization to speed compile
315 convert_nmm.o : convert_nmm.F
316 init_modules_em.o : init_modules_em.F
317 input_wrf.o : input_wrf.F
318 module_io.o : module_io.F
319 mediation_feedback_domain.o : mediation_feedback_domain.F
320 mediation_force_domain.o : mediation_force_domain.F
321 mediation_integrate.o : mediation_integrate.F
322 mediation_interp_domain.o : mediation_interp_domain.F
323 module_comm_dm.o : module_comm_dm.F
324 module_configure.o : module_configure.F
325 module_dm.o : module_dm.F
326 module_domain.o : module_domain.F
327 module_domain_type.o : module_domain_type.F
328 module_alloc_space.o : module_alloc_space.F
329 module_tiles.o : module_tiles.F
330 module_fddaobs_rtfdda.o : module_fddaobs_rtfdda.F
331 module_initialize.o : module_initialize.F
332 module_physics_init.o : module_physics_init.F
333 module_initialize_b_wave.o : module_initialize_b_wave.F
334 module_initialize_hill2d_x.o : module_initialize_hill2d_x.F
335 module_initialize_quarter_ss.o : module_initialize_quarter_ss.F
336 module_initialize_real.o : module_initialize_real.F
337 module_initialize_real.o: module_initialize_real.F
338 module_initialize_squall2d_x.o : module_initialize_squall2d_x.F
339 module_initialize_squall2d_y.o : module_initialize_squall2d_y.F
340 module_integrate.o : module_integrate.F
341 module_io_mm5.o : module_io_mm5.F
342 module_io_wrf.o : module_io_wrf.F
343 module_si_io.o : module_si_io.F
344 module_state_description.o : module_state_description.F
345 output_wrf.o : output_wrf.F
346 shift_domain_em.o : shift_domain_em.F
347 solve_em.o : solve_em.F
348 solve_interface.o : solve_interface.F
349 start_domain.o : start_domain.F
350 start_domain_nmm.o : start_domain_nmm.F
351 start_em.o : start_em.F
352 wrf_auxhist10in.o : wrf_auxhist10in.F
353 wrf_auxhist10out.o : wrf_auxhist10out.F
354 wrf_auxhist11in.o : wrf_auxhist11in.F
355 wrf_auxhist11out.o : wrf_auxhist11out.F
356 wrf_auxhist1in.o : wrf_auxhist1in.F
357 wrf_auxhist1out.o : wrf_auxhist1out.F
358 wrf_auxhist2in.o : wrf_auxhist2in.F
359 wrf_auxhist2out.o : wrf_auxhist2out.F
360 wrf_auxhist3in.o : wrf_auxhist3in.F
361 wrf_auxhist3out.o : wrf_auxhist3out.F
362 wrf_auxhist4in.o : wrf_auxhist4in.F
363 wrf_auxhist4out.o : wrf_auxhist4out.F
364 wrf_auxhist5in.o : wrf_auxhist5in.F
365 wrf_auxhist5out.o : wrf_auxhist5out.F
366 wrf_auxhist6in.o : wrf_auxhist6in.F
367 wrf_auxhist6out.o : wrf_auxhist6out.F
368 wrf_auxhist7in.o : wrf_auxhist7in.F
369 wrf_auxhist7out.o : wrf_auxhist7out.F
370 wrf_auxhist8in.o : wrf_auxhist8in.F
371 wrf_auxhist8out.o : wrf_auxhist8out.F
372 wrf_auxhist9in.o : wrf_auxhist9in.F
373 wrf_auxhist9out.o : wrf_auxhist9out.F
374 wrf_auxinput10in.o : wrf_auxinput10in.F
375 wrf_auxinput10out.o : wrf_auxinput10out.F
376 wrf_auxinput11in.o : wrf_auxinput11in.F
377 wrf_auxinput11out.o : wrf_auxinput11out.F
378 wrf_auxinput1in.o : wrf_auxinput1in.F
379 wrf_auxinput1out.o : wrf_auxinput1out.F
380 wrf_auxinput2in.o : wrf_auxinput2in.F
381 wrf_auxinput2out.o : wrf_auxinput2out.F
382 wrf_auxinput3in.o : wrf_auxinput3in.F
383 wrf_auxinput3out.o : wrf_auxinput3out.F
384 wrf_auxinput4in.o : wrf_auxinput4in.F
385 wrf_auxinput4out.o : wrf_auxinput4out.F
386 wrf_auxinput5in.o : wrf_auxinput5in.F
387 wrf_auxinput5out.o : wrf_auxinput5out.F
388 wrf_auxinput6in.o : wrf_auxinput6in.F
389 wrf_auxinput6out.o : wrf_auxinput6out.F
390 wrf_auxinput7in.o : wrf_auxinput7in.F
391 wrf_auxinput7out.o : wrf_auxinput7out.F
392 wrf_auxinput8in.o : wrf_auxinput8in.F
393 wrf_auxinput8out.o : wrf_auxinput8out.F
394 wrf_auxinput9in.o : wrf_auxinput9in.F
395 wrf_auxinput9out.o : wrf_auxinput9out.F
396 wrf_bdyin.o : wrf_bdyin.F
397 wrf_bdyout.o : wrf_bdyout.F
398 wrf_ext_read_field.o : wrf_ext_read_field.F
399 wrf_ext_write_field.o : wrf_ext_write_field.F
400 wrf_fddaobs_in.o : wrf_fddaobs_in.F
401 wrf_histin.o : wrf_histin.F
402 wrf_histout.o : wrf_histout.F
403 wrf_inputin.o : wrf_inputin.F
404 wrf_inputout.o : wrf_inputout.F
405 wrf_restartin.o : wrf_restartin.F
406 wrf_restartout.o : wrf_restartout.F
407 wrf_tsin.o : wrf_tsin.F
408 nl_get_0_routines.o : nl_get_0_routines.F
409 nl_get_1_routines.o : nl_get_1_routines.F
410 nl_set_0_routines.o : nl_set_0_routines.F
411 nl_set_1_routines.o : nl_set_1_routines.F
415 mediation_feedback_domain.o \
416 mediation_force_domain.o \
417 mediation_integrate.o \
418 mediation_interp_domain.o \
421 module_fddaobs_rtfdda.o \
422 module_initialize.o \
423 module_initialize_b_wave.o \
424 module_initialize_hill2d_x.o \
425 module_initialize_quarter_ss.o \
426 module_initialize_real.o \
427 module_initialize_squall2d_x.o \
428 module_initialize_squall2d_y.o \
441 module_alloc_space.o \
444 $(SED_FTN) $*.F > $*.b
445 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b > $*.f90
447 $(FC) -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(OMP) $(FCSUFFIX) $*.f90
451 $(SED_FTN) $*.F > $*.b
452 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b > $*.f90
454 $(FC) -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(OMP) $(SOLVE_EM_SPECIAL) $(FCSUFFIX) $*.f90
456 module_sf_ruclsm.o : module_sf_ruclsm.F
457 module_cu_kf.o : module_cu_kf.F
459 module_sf_ruclsm.o module_cu_kf.o :
461 $(SED_FTN) $*.F > $*.b
462 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b > $*.f90
464 $(FC) -c $(PROMOTION) $(FCREDUCEDOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(OMP) $(FCSUFFIX) $*.f90
466 # compile without OMP
470 module_domain_type.o \
471 module_physics_init.o \
495 wrf_auxinput10out.o \
497 wrf_auxinput11out.o \
518 wrf_ext_read_field.o \
519 wrf_ext_write_field.o \
526 module_state_description.o \
527 nl_set_0_routines.o \
528 nl_set_1_routines.o \
529 nl_get_0_routines.o \
530 nl_get_1_routines.o \
533 $(SED_FTN) $*.F > $*.b
534 $(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b > $*.f90
536 $(FC) -c $(PROMOTION) $(FCSUFFIX) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $*.f90