# This config file contains the compile options for compilation # of the GSI code on the NCEP IBM SP. All production builds # on NCEP IBM SP are 64-bit # ---------------------------------- # Redefine variables for NCEP IBM SP # ---------------------------------- CORE = /usr/local/jcsda/nwprod_2012 CORELIB = /usr/local/jcsda/nwprod_2012/lib COREINC = $(CORELIB)/incmod INCsfcio = $(COREINC)/sfcio_4 INCsigio = $(COREINC)/sigio_4 INCgfsio = $(COREINC)/gfsio_4 INCnemsio = $(COREINC)/nemsio INCw3lib = $(COREINC)/w3lib-2.0_d CRTMpath = ../lib/CRTM_REL-2.1.3 INCcrtm = $(CRTMpath)/include LIBcrtm = $(CRTMpath)/lib/libCRTM.a WRFPATH=$(CORE)/sorc/nam_nmm_real_fcst.fd LIBwrfio_int = $(WRFPATH)/external/io_int/libwrfio_int.a LIBwrfio_netcdf = $(WRFPATH)/external/io_netcdf/libwrfio_nf.a INCnetcdf = $(COREINC)/netcdf OBJwrf_frame_pk = $(WRFPATH)/frame/pack_utils.o OBJwrf_sizeof_int = $(WRFPATH)/frame/module_machine.o WRFLIB = $(LIBwrfio_int) $(LIBwrfio_netcdf) $(OBJwrf_frame_pk) $(OBJwrf_sizeof_int) # Empty out definition of libs use by GMAO GSI building structure LIBtransf = #-L$(CORELIB) -ltransf LIBhermes = #-L$(CORELIB) -lhermes LIBgfio = #-L$(CORELIB) -lgfio LIBhdf = #-L$(BASEDIR)/$(ARCH)/lib -lmfhdf -ldf -lhdfjpeg -lhdfz -lsz # --------------------------- # General targets/definitions # --------------------------- AR = ar -X64 -v -q # ---------------------------- # Fortran compiler and options # ---------------------------- CF = mpif90 FC = $(CF) #--- Normal mode options PROF= #-g -pg -qfullpath FFLAGS_F90 = -fp-model strict -xHOST -assume byterecl -free -traceback -D_REAL8_ -DWRF -openmp # FFLAGS_F90 = -O2 -fp-model strict -assume byterecl -convert big_endian -free -xHOST -traceback \ -openmp FFLAGS_COM_N = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCgfsio) -I $(INCnetcdf) \ -I $(INCnemsio) -I $(INCw3lib) -O2 -convert big_endian\ FFLAGS_COM_N_NOSWAP = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCgfsio) -I $(INCnetcdf) \ -I $(INCnemsio) -I $(INCw3lib) -O2 FFLAGS_N = $(FFLAGS_F90) $(FFLAGS_COM_N) $(PROF) FFLAGS_NOSWAP_N = $(FFLAGS_F90) $(FFLAGS_COM_N_NOSWAP) $(PROF) FFLAGS_f = $(FFLAGS_COM_N) $(PROF) FFLAGS = $(FFLAGS_N) $(PROF) #--- Debug mode options # -qflttrap=overflow:zero:enable \ is ok # -qflttrap=overflow:zero:underflow:enable \ fails FFLAGS_COM_D = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCgfsio) -I $(INCnemsio) \ -I $(INCnetcdf) -I $(INCw3lib) -O0 -convert big_endian \ -implicitnone -g -debug -ftrapuv -check all -fp-stack-check -fstack-protector -warn FFLAGS_COM_NOSWAP_D = -I ./ -I $(INCcrtm) -I $(INCsfcio) -I $(INCsigio) -I $(INCGFSIO) -I $(INCnemsio) \ -I $(INCnetcdf) -I $(INCw3lib) -O0 -implicitnone -g -debug -ftrapuv -check all \ -fp-stack-check -fstack-protector -warn FFLAGS_D = $(FFLAGS_F90) $(FFLAGS_COM_D) FFLAGS_NOSWAP_D = $(FFLAGS_F90) $(FFLAGS_COM_NOSWAP_D) # ---------------------- # C Compiler and options # ---------------------- # CC = gcc CC = icc #--- Normal mode options CFLAGS_N = -I. -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -O3 -Dfunder #--- Debug mode options CFLAGS_D = -I ./ -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -g -Dfunder # ------------------ # Linker and options # ------------------ LD = $(CF) #--- Normal mode options LIBS_N = -L$(CORELIB) -lnemsio -lsp_d -lsigio_4 -lsfcio_4 -lbufr_d_64 -lw3lib-2.0_d $(LIBcrtm) \ $(WRFLIB) -lbacio_4 -lnetcdf -lhdf5 -lhdf5_hl -mkl LDFLAGS_N = $(FFLAGS_F90) $(FFLAGS_COM_N) LDFLAGS = $(LDFLAGS_N) #--- Debug mode options LIBS_D = $(LIBS_N) LDFLAGS_D = $(FFLAGS_F90) $(FFLAGS_COM_D) #--- Empty out mpi library definition: embedded in compiler LIBmpi =