ifs.makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. $(info --> Reading $(lastword $(MAKEFILE_LIST)))
  2. comma := ,
  3. ECEARTH_SRC_DIR := ${HOME}/models/ecearth_3.3.3.2/sources
  4. MPI_BASE_DIR :=
  5. ifneq ($(strip $(MPI_BASE_DIR)),)
  6. MPI_INC_DIR := $(MPI_BASE_DIR)$(addprefix /,)
  7. MPI_LIB_DIR := $(MPI_BASE_DIR)$(addprefix /,)
  8. endif
  9. MPI_LIBS :=
  10. OASIS_BASE_DIR := $(ECEARTH_SRC_DIR)/oasis3-mct
  11. OASIS_ARCH := ecconf
  12. OASIS_MPI_CHAN := MPI1
  13. OASIS_MOD_DIR := $(OASIS_BASE_DIR)/$(OASIS_ARCH)/build/lib/psmile.$(OASIS_MPI_CHAN)
  14. OASIS_LIB_DIR := $(OASIS_BASE_DIR)/$(OASIS_ARCH)/lib
  15. OASIS_LIBS := psmile.MPI1 mct mpeu scrip
  16. ifneq ($(strip /),)
  17. NETCDF_LIB_DIR := $(EBROOTNETCDF)/lib64 $(EBROOTNETCDFMINFORTRAN)/lib
  18. NETCDF_INC_DIR := $(EBROOTNETCDF)/include $(EBROOTNETCDFMINFORTRAN)/include
  19. endif
  20. NETCDF_LIBS := netcdff netcdf
  21. LAPACK_BASE_DIR := $(EBROOTIMKL)/mkl/latest
  22. ifneq ($(strip $(LAPACK_BASE_DIR)),)
  23. LAPACK_LIB_DIR := $(LAPACK_BASE_DIR)$(addprefix /,lib/intel64)
  24. endif
  25. LAPACK_LIBS := mkl_intel_lp64 mkl_core mkl_sequential
  26. ifneq ($(strip $(EBROOTGRIB_API)),)
  27. GRIBAPI_INC_DIR := $(EBROOTGRIB_API)/include
  28. GRIBAPI_LIB_DIR := $(EBROOTGRIB_API)/lib
  29. endif
  30. GRIBAPI_LIBS := grib_api_f90 grib_api
  31. ifneq ($(strip /gpfs/projects/acad/ecearth/softs/gribex/iompi-2022.05),)
  32. GRIBEX_LIB_DIR := /gpfs/projects/acad/ecearth/softs/gribex/iompi-2022.05/lib
  33. endif
  34. GRIBEX_LIBS := gribexR64
  35. MAKEDEPF90 := $(ECEARTH_SRC_DIR)/util/makedepf90/bin/makedepf90
  36. F90 := mpif90
  37. F90FLAGS := -r8 -O3 -march=core-avx2 -ip -fp-model precise -extend-source 132
  38. IFSAUX_ADD_F90FLAGS :=
  39. FC := mpif90
  40. FFLAGS := -r8 -O3 -march=core-avx2 -ip -fp-model precise -extend-source 132
  41. FPPDEFS := $(addprefix -D,linux LINUX LITTLE LITTLE_ENDIAN POINTER_64 BLAS)
  42. CC := mpicc
  43. CFLAGS := -fp-model precise -march=core-avx2
  44. CPPDEFS := $(addprefix -D,linux LINUX LITTLE LITTLE_ENDIAN POINTER_64 BLAS)
  45. LD := $(F90)
  46. LDFLAGS := -fp-model precise -march=core-avx2
  47. AR := ar
  48. ARFLAGS := curv
  49. ARFLAGS_EXTRACT := p