# configure.wrf # # This file was automatically generated by the configure script in the # top level directory. You may make changes to the settings in this # file but be aware they will be overwritten each time you run configure. # Ordinarily, it is necessary to run configure once, when the code is # first installed. # # To permanently change options, change the settings for your platform # in the file arch/configure.defaults then rerun configure. # SHELL = /bin/sh DEVTOP = `pwd` LIBINCLUDE = . .SUFFIXES: .F .i .o .f90 .c #### Get core settings from environment (set in compile script) #### Note to add a core, this has to be added to. COREDEFS = -DEM_CORE=$(WRF_EM_CORE) \ -DNMM_CORE=$(WRF_NMM_CORE) -DNMM_MAX_DIM=2600 \ -DCOAMPS_CORE=$(WRF_COAMPS_CORE) \ -DDA_CORE=$(WRF_DA_CORE) \ -DEXP_CORE=$(WRF_EXP_CORE) #### Single location for defining total number of domains. You need #### at least 1 + 2*(number of total nests). For example, 1 coarse #### grid + three fine grids = 1 + 2(3) = 7, so MAX_DOMAINS=7. MAX_DOMAINS = 21 #### DM buffer length for the configuration flags. CONFIG_BUF_LEN = 16384 ############################################################################## #### The settings in this section are defaults that may be overridden by the #### architecture-specific settings in the next section. ############################################################################## ############################################################################## #### NOTE: Do not modify these default values here. To override these #### values, make changes after "Architecture specific settings". ############################################################################## #### Native size (in bytes) of Fortran REAL data type on this architecture #### #### Note: to change real wordsize (for example, to promote REALs from #### 4-byte to 8-byte), modify the definition of RWORDSIZE in the #### section following "Architecture specific settings". Do not #### change NATIVE_RWORDSIZE as is it architecture-specific. NATIVE_RWORDSIZE = 4 #### Default sed command and script for Fortran source files #### SED_FTN = sed -f ../arch/standard.sed # Hack to work around $(PWD) not changing during OSF1 build. # $(IO_GRIB_SHARE_DIR) is reset during the OSF1 build only. IO_GRIB_SHARE_DIR = #### ESMF switches #### #### These are set up by Config.pl #### # switch to use separately installed ESMF library for coupling: 1==true ESMF_COUPLING = 0 # select dependences on module_utility.o ESMF_MOD_DEPENDENCE = ../external/esmf_time_f90/module_utility.o # select -I options for separately installed ESMF library, if present ESMF_MOD_INC = # select -I options for external/io_esmf vs. external/esmf_time_f90 ESMF_IO_INC = -I../external/esmf_time_f90 # select cpp token for external/io_esmf vs. external/esmf_time_f90 ESMF_IO_DEFS = # select build target for external/io_esmf vs. external/esmf_time_f90 ESMF_TARGET = esmf_time ############################################################################## LIBWRFLIB = libwrflib.a #### Architecture specific settings #### # Settings for Generic Intel 64 x86_64 Linux, ifort+icc 9.x,10.x DM-Parallel (MPICH, OpenMP, RSL_LITE) # # Notes: for experimental implementation of moving nests, add -DMOVE_NESTS to ARCHFLAGS # for experimental implementation of vortex tracking nests, add -DMOVE_NESTS -DVORTEX_CENTER to ARCHFLAGS # # By default, some files are compiled without optimizations to speed up compilation. Removing # respective makefile rules in the end of this file will result in longer compilation time, and, possibly # Out Of Memory messages, but might produce binaries which are substantially faster. # # If you got Out Of Memory message, there are several options: # 1. Check your memory limits (ulimit -a), possibly increasing swap partitions size. # 2. Remove any debugging flags (-g, -check, -traceback). # 3. Force the problematic file to be compiled with less optimizations (see examples at the end of this file), try # -no-ip compiler flag. # # This configuration is aimed at accuracy. To improve performance (at the expence of accuracy) you might # consider removing '-fp-model precise' flag from FCBASEOPTS. This enables non value-safe optimizations. # Another option is to add '-ftz' flag, which flushes denormal results to zero when the application is in # the gradual underflow mode. It may improve performance if the denormal values are not critical to the # behavior of your workload. # If you have Intel MPI installed and wish to use instead, make the # following changes to settings below: # FC = $(MPI_HOME)/bin64/mpiifort -nocompchk # CC = $(MPI_HOME)/bin64/mpiicc -nocompchk DMPARALLEL = 1 OMP = -qopenmp -fpp -auto OMPCPP = -D_OPENMP INCLUDE = ../external/io_netcdf/ MAX_PROC = 1024 MPI_HOME = /opt/intel/oneapi/mpi/latest FC = $(MPI_HOME)/bin/mpif90 -f90=ifort LD = $(FC) CC = $(MPI_HOME)/bin/mpicc -cc=icc #-DFSEEKO64_OK SCC = /opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc CC_TOOLS = $(SCC) SFC = /opt/intel/oneapi/compiler/latest/linux/bin/intel64/ifort CFLAGS = -w -O3 -ip -c -DDM_PARALLEL -I../external/RSL_LITE -qopenmp FCOPTIM = -O3 FCDEBUG = # -g -traceback FCBASEOPTS = -align all -FR -convert big_endian \ -fno-alias -fno-fnalias \ -I$(INCLUDE) -I. -fp-model precise $(FCDEBUG) FCFLAGS = $(FCOPTIM) $(FCBASEOPTS) $(OMP) ARCHFLAGS = -DGRIB1 -DINTIO -DRSL_LITE -DDM_PARALLEL \ -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNETCDF \ -DLIMIT_ARGS # machine-specific flags needed to link in ESMF library (C++ run-time-library, etc.) ESMF_LIB_FLAGS = ESMF_IO_LIB = ../external/esmf_time_f90/libesmf_time.a ESMF_IO_LIB_EXT = -L../../external/esmf_time_f90/libesmf_time.a INCLUDE_MODULES = -I../main -I../external/io_netcdf -I../external/io_int -I../external/esmf_time_f90 \ -I../external -I../frame -I../share -I../phys -I../inc PERL = perl REGISTRY = Registry LIB = -L../external/io_netcdf -lwrfio_nf $(OMP) \ \ -L../external/RSL_LITE -lrsl_lite \ -L../external/io_grib1 -lio_grib1 \ \ -L../external/io_grib_share -lio_grib_share \ -L../external/io_int -lwrfio_int \ ../frame/module_internal_header_util.o ../frame/pack_utils.o \ -L../external/fftpack/fftpack5 -lfftpack \ -L../external/esmf_time_f90 -lesmf_time LDFLAGS = -O3 -ip $(OMP) CPP = /lib/cpp -C -P -traditional POUND_DEF = -DNO_RRTM_PHYSICS -DCONFIG_BUF_LEN=$(CONFIG_BUF_LEN) -DMAX_DOMAINS_F=$(MAX_DOMAINS) CPPFLAGS = -I$(LIBINCLUDE) -C -P -traditional $(COREDEFS) $(ARCHFLAGS) $(OMPCPP) \ -I$(INCLUDE) -I../external/RSL_LITE -C -P `cat ../inc/dm_comm_cpp_flags` \ $(POUND_DEF) $(COREDEFS) AR = ar ru M4 = m4 RANLIB = ranlib NETCDFPATH = externals : ../external/RSL_LITE/librsl_lite.a gen_comms.c wrfio_int module_dm.F wrfio_grib_share wrfio_grib1 esmf_time fftpack gen_comms.c : ../external/RSL_LITE/gen_comms.c ( /bin/cp ../tools/gen_comms_warning ../tools/gen_comms.c ; \ cat ../external/RSL_LITE/gen_comms.c >> ../tools/gen_comms.c ) module_dm.F : ../external/RSL_LITE/module_dm.F ( /bin/cp module_dm_warning module_dm.F ; \ cat ../external/RSL_LITE/module_dm.F >> module_dm.F ) ../external/RSL_LITE/librsl_lite.a : ( cd ../external/RSL_LITE ; make CC='$(CC) -I. $(CFLAGS) -DMPI2_SUPPORT -I$(MPI_HOME)/include '\ FC='$(FC) $(FCFLAGS) -I../../.. ' MAX_DOMAINS=$(MAX_DOMAINS) MAX_PROC=$(MAX_PROC) ) wrfio_nf : ( cd ../external/io_netcdf ; \ make NETCDFPATH= CPP="$(CPP)" FC="$(FC) -I../.. $(FCFLAGS)" \ TRADFLAG="-traditional" RANLIB="$(RANLIB)" ; \ /bin/cp ../ioapi_share/wrf_io_flags.h ../ioapi_share/wrf_status_codes.h ../../inc ; \ /bin/cp ../ioapi_share/wrf_io_flags.h ../ioapi_share/wrf_status_codes.h ../io_phdf5 ; \ /bin/cp ../ioapi_share/wrf_io_flags.h ../io_quilt ) wrfio_int : ( cd ../external/io_int ; \ make CC="$(CC)" CPP="$(CPP)" TRADFLAG="-traditional" RANLIB="$(RANLIB)" \ SFC="$(SFC) -I$(MPI_HOME)/include $(FCDEBUG) $(FCFLAGS)" \ ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \ FC="$(FC) -I$(MPI_HOME)/include $(FCDEBUG) $(FCFLAGS)" all ) wrfio_grib_share : ( cd ../external/io_grib_share ; \ make CC="$(CC)" CFLAGS="$(CFLAGS)" RM="$(RM)" TRADFLAG="-traditional" RANLIB="$(RANLIB)" CPP="$(CPP)" \ FC="$(FC) -I$(MPI_HOME)/include $(FCDEBUG) $(FCFLAGS)" archive) wrfio_grib1 : ( cd ../external/io_grib1 ; \ make CC="$(CC)" CPP="$(CPP)" TRADFLAG="-traditional" RANLIB="$(RANLIB)" \ FC="$(FC) -I$(MPI_HOME)/include $(FCDEBUG) $(FCFLAGS)" archive ) wrfio_grib2 : ( cd ../external/io_grib2 ; \ make CC="$(CC) " CPP="$(CPP) " RM="$(RM)" TRADFLAG="-traditional" RANLIB="$(RANLIB)" \ FREE="-FR" FIXED="-FI" \ FC="$(FC) -I$(MPI_HOME)/include $(FCDEBUG) $(FCFLAGS)" archive ) esmf_time : ( cd ../external/esmf_time_f90 ; \ make FC="$(FC) $(FCDEBUG) $(FCFLAGS)" CPP="$(CPP) -I../../inc -I. $(POUND_DEF)" ) fftpack : ( cd ../external/fftpack/fftpack5 ; \ make FC="$(SFC)" FFLAGS="$(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" ) # Compile these without high optimization and no interprocedural # optimizations to speed compile. Commenting them out may result # in longer compilation time, but might produce substantialy faster # binaries. mediation_integrate.o : mediation_integrate.F mediation_interp_domain.o : mediation_interp_domain.F mediation_feedback_domain.o : mediation_feedback_domain.F wrf_auxinput1out.o : wrf_auxinput1out.F wrf_histout.o : wrf_histout.F wrf_restartout.o : wrf_restartout.F wrf_inputin.o : wrf_inputin.F wrf_auxinput1in.o : wrf_auxinput1in.F wrf_histin.o : wrf_histin.F wrf_restartin.o : wrf_restartin.F module_initialize_real.o: module_initialize_real.F solve_interface.o : solve_interface.F shift_domain_em.o : shift_domain_em.F module_io_wrf.o : module_io_wrf.F module_dm.o : module_dm.F module_domain.o : module_domain.F start_domain.o : start_domain.F mediation_force_domain.o : mediation_force_domain.F module_configure.o : module_configure.F mediation_integrate.o mediation_interp_domain.o mediation_feedback_domain.o \ module_configure.o \ wrf_auxinput1out.o wrf_histout.o wrf_restartout.o wrf_inputin.o \ wrf_auxinput1in.o wrf_histin.o wrf_restartin.o module_initialize_real.o \ module_domain.o module_dm.o module_io_wrf.o start_domain.o solve_interface.o \ shift_domain_em.o \ mediation_force_domain.o: $(RM) $@ $(SED_FTN) $*.F > $*.b $(CPP) -I../inc $(CPPFLAGS) $*.b > $*.f90 $(RM) $*.b $(FC) -c -no-ip $(FCBASEOPTS) $(FCDEBUG) $(MODULE_DIRS) $*.f90 # Force even lower optimization level for these files to decrease # compilation time and lower memory demands solve_em.o : solve_em.F module_dm.o : module_dm.F solve_em.o \ module_dm.o : $(RM) $@ $(SED_FTN) $*.F > $*.b $(CPP) -I../inc $(CPPFLAGS) $*.b > $*.f90 $(RM) $*.b $(FC) -c $(FCBASEOPTS) $(FCDEBUG) $(OMP) -O0 $(MODULE_DIRS) -mP2OPT_vec_xform_level=103 $*.f90 ############################################################ # These sub-directory builds are identical across all architectures wrfio_esmf : ( cd ../external/io_esmf ; \ make FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS) $(ESMF_MOD_INC)" RANLIB="$(RANLIB)" CPP="$(CPP) $(POUND_DEF) " ) # # Macros, these should be generic for all machines LN = ln -sf MAKE = make -i -r RM = rm -f # There is probably no reason to modify these rules wrf_ioapi_includes : ( cd ../external/ioapi_share ; \ $(MAKE) NATIVE_RWORDSIZE="$(NATIVE_RWORDSIZE)" RWORDSIZE="$(RWORDSIZE)" ) .F.i: $(RM) $@ $(CPP) -I../inc $(CPPFLAGS) $*.F > $@ mv $*.i $(DEVTOP)/pick/$*.f90 cp $*.F $(DEVTOP)/pick .F.o: $(RM) $@ $(SED_FTN) $*.F > $*.b $(CPP) -I../inc $(CPPFLAGS) $*.b > $*.f90 $(RM) $*.b $(FC) -o $@ -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90 #PGI if [ ! -e $@ ] ; then \ #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \ #PGI fi #PGI if [ ! -e $@ ] ; then \ #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \ #PGI fi .F.f90: $(RM) $@ $(SED_FTN) $*.F > $*.b $(CPP) -I../inc $(CPPFLAGS) $*.b > $@ $(RM) $*.b .f90.o: $(RM) $@ $(FC) -o $@ -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90 #PGI if [ ! -e $@ ] ; then \ #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \ #PGI fi #PGI if [ ! -e $@ ] ; then \ #PGI sleep 10 ; $(FC) -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90 ; \ #PGI fi .c.o: $(RM) $@ $(CC) -o $@ -c $(CFLAGS) $*.c