################################################################################ # Parallel SCHISM Makefile # # User makes environment settings for particular OS / PLATFORM / COMPILER / MPI # below as well as setting flags having to do with included algorithms (e.g. sediment) # and the compiler configuration (debug, timing). # # The environment settings are based on the following options. # # Compiler name: # FCS: Serial compiler (for utilities) # FCP: Parallel compiler # FLD: Linker (in general same as parallel compiler) # # Compilation flags # FCSFLAGS: Flags for serial compilation # FCPFLAGS: Flags for parallel compilation (including all pre-processing flags) # FLDFLAGS: Flags for linker (e.g., -O2) # # Preprocessor flags: # DEBUG: Enable debugging code # ORDERED_SUM: Enable globally ordered sums & dot-products for bit reproducibility # of state quantities independent of number of processors (note: this can # significantly degrade performance); # INCLUDE_TIMING: Enable wallclock timing of code (note: this can have slight # effect on performance); # MPI_VERSION = 1 or 2: Version of MPI (try 2 first, if compile fails due to mpi # related errors then switch to version 1; # # Libraries (needed for parallel code) # MTSLIBS: Flags for linking ParMeTiS/MeTiS libaries ################################################################################ ################################################################################ ## Environment for NASA/PLEIADES (SGI ALTIX) ################################################################################# ENV = PLEIADES ################################################################################ # Alternate executable name if you do not want the default. ################################################################################ EXEC := pschism_$(ENV) ################################################################################ # COMPILERS ################################################################################ FCP = ifort FCS = ifort FLD = $(FCP) PPFLAGS := $(PPFLAGS) -DMPIVERSION=1 #FCPFLAGS = $(PPFLAGS) -O2 -CB -g -traceback -mcmodel=medium -Bstatic -assume byterecl -ipo -axCORE-AVX2 -xSSE4.2 #Normal #Note: use of either of these options, -xCORE-AVX512 or -axCORE-AVX512, could either improve or degrade performance of your code. #Be sure to check performance with and without these flags before using them for production runs FCPFLAGS = $(PPFLAGS) -O3 -no-prec-div -mcmodel=medium -Bstatic -assume byterecl -ipo -axCORE-AVX512 -xSSE4.2 FLDFLAGS = -O3 -no-prec-div -mcmodel=medium -shared-intel -ipo -axCORE-AVX512 -xSSE4.2 -lmpi #for final linking of object files #Hybrid #FCPFLAGS = $(PPFLAGS) -g -O2 -no-prec-div -mcmodel=medium -Bstatic -assume byterecl -ipo -axCORE-AVX2 -xSSE4.2 -qopenmp #FLDFLAGS = -g -O2 -no-prec-div -mcmodel=medium -shared-intel -ipo -axCORE-AVX2 -xSSE4.2 -qopenmp -lmpi #for final linking of object files ##without -O for Inspector #FCPFLAGS = $(PPFLAGS) -g -no-prec-div -mcmodel=medium -Bstatic -assume byterecl -ipo -axCORE-AVX2 -xSSE4.2 -qopenmp #FLDFLAGS = -g -no-prec-div -mcmodel=medium -shared-intel -ipo -axCORE-AVX2 -xSSE4.2 -qopenmp -lmpi #for final linking of object files #EXEC := $(EXEC)_OMP #Libraries ##MTSLIBS = -L./ParMetis-3.1-Sep2010/ -lparmetis -lmetis ##SLES12 CDFLIBS = -L/nasa/netcdf/4.4.1.1_serial/lib -lnetcdf -lnetcdff CDFMOD = -I/nasa/netcdf/4.4.1.1_serial/include/ # modules for netcdf ################################################################################ # Algorithm preference flags. # Comment out unwanted modules and flags. ################################################################################ # -DSCHISM is always on and is defined elsewhere include ../mk/include_modules # Don't comment out the follow ifdef ifdef USE_GOTM GTMMOD = -I/home3/yjzhang/GOTM_Intel64/modules/IFORT/ #modules GTMLIBS = -L/home3/yjzhang/GOTM_Intel64/lib/IFORT/ -lturbulence_prod -lutil_prod else GTMMOD = GTMLIBS = endif ######### Specialty compiler flags and workarounds # Add -DNO_TR_15581 like below for allocatable array problem in sflux_subs.F90 # PPFLAGS := $(PPFLAGS) -DNO_TR_15581 # Obsolete flags: use USE_WRAP flag to avoid problems in ParMetis lib (calling C from FORTRAN) # PPFLAGS := $(PPFLAGS) -DUSE_WRAP