#FLASH makefile definitions for ix86-64 Linux (gfortran compiler) #---------------------------------------------------------------------------- # Set the HDF/HDF5 library paths -- these need to be updated for your system #---------------------------------------------------------------------------- #HDF4_PATH = HDF5_PATH = /Users/victorflores/WorkDirectory/hdf5-1.12.0 #LIB_HDF5 = ${HDF5_PATH}/lib HYPRE_PATH = /Users/victorflores/WorkDirectory/hypre-master/src/hypre ZLIB_PATH = PAPI_PATH = PAPI_FLAGS = LIB_NCMPI = /Users/victorflores/WorkDirectory/pnetcdf-1.12.2/src MPE_PATH = MPI_PATH = /usr/local/Cellar/mpich/3.4.2/bin #---------------------------------------------------------------------------- # Compiler and linker commands # # Use the MPICH wrappers around the compilers -- these will automatically # load the proper libraries and include files. Version of MPICH prior # to 1.2.2 (?) do not recognize .F90 as a valid Fortran file extension. # You need to edit mpif90 and add .F90 to the test of filename extensions, # or upgrade your MPICH. #---------------------------------------------------------------------------- FCOMP=$(MPI_PATH)/mpif90 CCOMP=$(MPI_PATH)/mpicc CPPCOMP=$(MPI_PATH)/mpic++ LINK=$(MPI_PATH)/mpif90 # pre-processor flag PP = -D #---------------------------------------------------------------------------- # Compilation flags # # Three sets of compilation/linking flags are defined: one for optimized # code, one for testing, and one for debugging. The default is to use the # _OPT version. Specifying -debug to setup will pick the _DEBUG version, # these should enable bounds checking. Specifying _TEST is used for # flash_test, and is set for quick code generation, and (sometimes) # profiling. The Makefile generated by setup will assign the generic token # (ex. FFLAGS) to the proper set of flags (ex. FFLAGS_OPT). #---------------------------------------------------------------------------- OPENMP= -fopenmp FFLAGS_OPT = -c -O2 -fdefault-real-8 -fdefault-double-8 -fallow-argument-mismatch FFLAGS_DEBUG = -g -c -fallow-argument-mismatch -fdefault-real-8 -fdefault-double-8 -Wall -pedantic -fbacktrace -ffpe-trap=invalid,zero,overflow FFLAGS_TEST = -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none -fallow-argument-mismatch FFLAGS_HYPRE = -I${HYPRE_PATH}/include CFLAGS_HYPRE = -I${HYPRE_PATH}/include FFLAGS = -g -O2 -fallow-argument-mismatch FCFLAGS = -g -O2 -fallow-argument-mismatch #F90FLAGS = CFLAGS_OPT = -O2 -c -Wno-implicit-function-declaration CFLAGS_DEBUG = -g -c CFLAGS_TEST = -c CFLAGS = -g -O2 -c CFLAGS = -g -Wall -Wextra -pedantic -Werror -target x86_64-apple-darwin CXXFLAGS = -g -O2 -c # Platform symbol CDEFINES += -DDarwin # if we are using HDF5, we need to specify the path to the include files CFLAGS_HDF5 = -I${HDF5_PATH}/src -DH5_USE_16_API CFLAGS_NCMPI = -I$(LIB_NCMPI)/include #---------------------------------------------------------------------------- # Linker flags # # There is a seperate version of the linker flags for each of the _OPT, # _DEBUG, and _TEST cases. #---------------------------------------------------------------------------- LFLAGS_OPT = -lz -o LFLAGS_DEBUG = -lz -g -o LFLAGS_TEST = -lz -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_OPT = LIB_DEBUG = LIB_TEST = #LIB_HDF5 = -L${HDF5_PATH}/lib -lhdf5 /usr/lib64/libz.a LIB_HDF5 = -L${HDF5_PATH}/tools/lib -DH5_USE_16_API LIB_HYPRE = -L${HYPRE_PATH}/lib -lHYPRE LIB_NCMPI = -L$(NCMPI_PATH)/lib -lpnetcdf LIB_MPE = -L$(MPI_PATH)/lib -lmpe LIB_PAPI = #LIB_MATH = -ldfftw -ldrfftw LIB_MPI = #LIB_NCMPI = -L $(NCMPI_PATH)/lib -lpnetcdf LIB_MPE = #---------------------------------------------------------------------------- # 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 #---------------------------------------------------------------------------- # Fake existence of iso_c_bindings module to prevent unnecessary recompilations. #---------------------------------------------------------------------------- ifeq ($(FLASHBINARY),true) iso_c_binding.mod : touch $@ #gcc version 4.9.1 results in MPI communication errors #unless we compile with -O0 mpi_amr_1blk_guardcell.o : %.o : %.F90 $(FCOMP) $(FFLAGS) -O0 $(F90FLAGS) $(FDEFINES) $< endif