# FLASH makefile definitions for the 64 bit Intel icc/ifort compiler on Linux #---------------------------------------------------------------------------- # Set the HDF/HDF5 library paths -- these need to be updated for your system #---------------------------------------------------------------------------- MC_SIZE = large MPI_PATH = MPI_HOME = ${I_MPI_ROOT} MPI_BIN = ${MPI_HOME}/bin64 HDF4_PATH = HDF5_PATH = ${HDF5_ROOT} HDF5_INC = $(HDF5_INCLUDE) ZLIB_PATH = PAPI_PATH = PAPI_FLAGS = FISHPAK_PATH = NCMPI_PATH = MPE_PATH = #---------------------------------------------------------------------------- # Compiler and linker commands # # We use the f90 compiler as the linker, so some C libraries may explicitly # need to be added into the link line. #---------------------------------------------------------------------------- FCOMP = ${MPI_BIN}/mpiifort CCOMP = ${MPI_BIN}/mpiicc CPPCOMP = ${MPI_BIN}/mpiicpc LINK = ${MPI_BIN}/mpiifort # pre-processor flag PP = -D #----------------------------------------------------------------------------- # Compilation flags # # Three sets of compilation/linking flags are defined: one for optimized code # code ("-opt"), one for debugging ("-debug"), and one for testing ("-test"). # Passing these flags to the setup script will cause the value associated with # the corresponding keys (i.e. those ending in "_OPT", "_DEBUG", or "_TEST") to # be incorporated into the final Makefile. For example, passing "-opt" to the # setup script will cause the flags following "FFLAGS_OPT" to be assigned to # "FFLAGS" in the final Makefile. If none of these flags are passed, the default # behavior will match that of the "-opt" flag. # In general, "-opt" is meant to optimize compilation and linking. "-debug" # should enable runtime bounds checking, debugger symbols, and other compiler- # specific debugging options. "-test" is useful for testing different # combinations of compiler flags particular to your individual system. #---------------------------------------------------------------------------- HDFCOMPAT = -DH5Acreate_vers=1 -DH5Aiterate_vers=1 -DH5Dcreate_vers=1 -DH5Dopen_vers=1 -DH5Eclear_vers=1 -DH5Eprint_vers=1 -DH5Epush_vers=1 -DH5Eset_auto_vers=1 -DH5Eget_auto_vers=1 -DH5Ewalk_vers=1 -DH5Gcreate_vers=1 -DH5Gopen_vers=1 -DH5Pget_filter_vers=1 -DH5Pget_filter_by_id_vers=1 -DH5Pinsert_vers=1 -DH5Pregister_vers=1 -DH5Rget_obj_typevers=1 -DH5Tarray_create_vers=1 -DH5Tcommit_vers=1 -DH5Tget_array_dims_vers=1 -DH5Topen_vers=1 FFLAGS_OPT = -fpic -mcmodel=${MC_SIZE} -c -r8 -i4 -O3 -real_size 64 -fp-model strict -axSSE4.2,AVX,CORE-AVX2 FFLAGS_DEBUG = $(HDFCOMPAT) -mcmodel=${MC_SIZE} -c -g -r8 -i4 -O0 -check bounds -check format \ -check output_conversion -warn all -warn error -real_size 64 -check uninit \ -traceback -fp-stack-check -diag-disable 10120 -fpe0 -check pointers FFLAGS_TEST = -c -r8 -i4 -O2 CFLAGS_OPT = -c -O3 -D_LARGEFILE64_SOURCE CFLAGS_DEBUG = -c -g -debug extended -$(CFLAGS_MPI) -D_LARGEFILE64_SOURCE $(HDFCOMPAT) -mcmodel=${MC_SIZE} -shared-intel CFLAGS_TEST = -c -O2 $(CFLAGS_MPI) -D_LARGEFILE64_SOURCE $(HDFCOMPAT) CFLAGS_HDF5 = -I $(HDF5_INC) $(HDFCOMPAT) CFLAGS_NCMPI = CFLAGS_MPI = -I $(MPI_HOME)/include64 #--------------------------------------------------------------------------- # Linker flags # # There is a seperate version of the linker flags for each of the _OPT, # _DEBUG, and _TEST cases. #---------------------------------------------------------------------------- LFLAGS_OPT = -r8 -i4 -Vaxlib -lsvml -Ur -axSSE4.2,AVX,CORE-AVX2 -o LFLAGS_DEBUG = -mcmodel=${MC_SIZE} -shared-intel -r8 -i4 -lsvml -Ur -g -o LFLAGS_TEST = -r8 -i4 -o #---------------------------------------------------------------------------- # Library specific linking # # If a FLASH module has a 'LIBRARY xxx' line in its Config file, we need to # create a macro in this Makefile.h for LIB_xxx, which will be added to the # link line when FLASH is built. This allows us to switch between different # (incompatible) libraries. We also create a _OPT, _DEBUG, and _TEST # library macro to add any performance-minded libraries (like fast math), # depending on how FLASH was setup. #---------------------------------------------------------------------------- LIB_HDF4 = -L $(HDF4_PATH)/lib -lmfhdf -ldf -lz -ljpeg LIB_HDF5 = -L $(HDF5_LIB) -lhdf5 -lz LIB_PNG = -lpng LIB_MPI = LIB_MPI = -L$(MPI_HOME)/lib64 -lpthread LIB_NCMPI = -L$(NCMPI_PATH)/lib -lpnetcdf LIB_MPE = LIB_FISHPAK = #---------------------------------------------------------------------------- # Additional machine-dependent object files # # Add any machine specific files here -- they will be compiled and linked # when FLASH is built. #---------------------------------------------------------------------------- MACHOBJ = #---------------------------------------------------------------------------- # Additional commands #---------------------------------------------------------------------------- MV = mv -f AR = ar -r RM = rm -f CD = cd RL = ranlib ECHO = echo ifeq ($(FLASHBINARY),true) FFLAGS_WO_WARNALL = $(patsubst -warn all,,$(FFLAGS)) #Fortran 77 source lines exceed 72 characters umap.o : %.o : %.F $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< fftsg.o : %.o : %.f $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< fftsg3d.o : %.o : %.f $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< #Files mix and match assumed shape arrays, assumed size arrays #and scalars in function calls. This is fine but it is viewed as #a problem when using strict type checking compiler options. fftpack.o : %.o : %.f90 $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< gr_pfftDcftForward.o : %.o : %.F90 $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< gr_pfftDcftInverse.o : %.o : %.F90 $(FCOMP) $(FFLAGS_WO_WARNALL) $(FDEFINES) $< endif