oasis.makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $(info --> Reading configuration from $(lastword $(MAKEFILE_LIST)))
  2. # ============================================================================
  3. # *** Configuration for gimle-intel-scampi
  4. # ============================================================================
  5. COUPLE := ${HOME}/models/ecearth_3.3.3.2/sources/oasis3-mct
  6. # CHAN : MPI1/MPI2
  7. CHAN := MPI1
  8. # MPI library
  9. MPIDIR :=
  10. ifneq ($(strip $(MPIDIR)),)
  11. MPIBIN := $(MPIDIR)/bin
  12. MPI_INCLUDE := $(MPIDIR)$(addprefix /,)
  13. MPILIB := -L$(MPIDIR)$(addprefix /,)
  14. endif
  15. MPILIB += $(addprefix -l,)
  16. # NETCDF library
  17. NETCDF_DIR := /
  18. NETCDF_INCLUDE := $(addprefix $(addsuffix /,$(NETCDF_DIR)),$(EBROOTNETCDF)/include $(EBROOTNETCDFMINFORTRAN)/include)
  19. NETCDF_LIBRARY := $(addprefix -L,$(addprefix $(addsuffix /,$(NETCDF_DIR)),$(EBROOTNETCDF)/lib64 $(EBROOTNETCDFMINFORTRAN)/lib))
  20. NETCDF_LIBRARY += $(addprefix -l,netcdff netcdf)
  21. # Compiling and other commands
  22. MAKE := make
  23. F90 := mpif90 -march=core-avx2
  24. F := $(F90)
  25. f90 := $(F90)
  26. f := $(F)
  27. CC := mpicc
  28. LD := mpif90
  29. AR := ar
  30. ARFLAGS := curv
  31. # CPP/FPP macros
  32. MACROS := use_libMPI use_comm_$(CHAN) use_netCDF TREAT_OVERLAY
  33. MACROS +=
  34. # Compiler options
  35. F90FLAGS := -r8 -O3 -ip -fp-model precise -extend-source 132
  36. F90FLAGS +=
  37. F90FLAGS += $(addprefix -D,$(MACROS))
  38. F90FLAGS += $(addprefix -I,$(MPI_INCLUDE))
  39. F90FLAGS += $(addprefix -I,$(NETCDF_INCLUDE))
  40. f90FLAGS := $(F90FLAGS)
  41. FFLAGS := $(F90FLAGS)
  42. fFLAGS := $(F90FLAGS)
  43. CCFLAGS := -O2 -fp-model precise -march=core-avx2
  44. CCFLAGS += $(addprefix -D,$(MACROS))
  45. CCFLAGS := $(addprefix -I,$(MPI_INCLUDE))
  46. CCFLAGS += $(addprefix -I,$(NETCDF_INCLUDE))
  47. LDFLAGS :=
  48. LDFLAGS +=
  49. # MPP_IOOPT needed for compiling mpp_io
  50. MPP_IOOPT :=