From d1aec29026224fa6649e10ac92ae386966b98033 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Fri, 4 Oct 2024 08:20:43 -0400 Subject: [PATCH] Backport fixes from v8 baselibs (#234) --- .github/workflows/release-tarfile.yml | 35 +++++++++++++++++++++++++-- Base.mk | 10 ++++++++ CHANGELOG.md | 17 +++++++++++++ GNUmakefile | 21 +++++++++++++--- README.md | 5 ++++ VERSION | 2 +- 6 files changed, 84 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-tarfile.yml b/.github/workflows/release-tarfile.yml index 3f5e5ff..bda6a3b 100644 --- a/.github/workflows/release-tarfile.yml +++ b/.github/workflows/release-tarfile.yml @@ -1,4 +1,4 @@ -name: Create Complete Release Tarball +name: Create Release Tarballs on: release: @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }} submodules: recursive @@ -31,3 +31,34 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + mapl: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }} + submodules: recursive + + - name: Download non-git libraries + run : | + cd ${GITHUB_WORKSPACE}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }} + make download + + - name: Remove unneeded directories + run : | + cd ${GITHUB_WORKSPACE}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }} + rm -rf antlr2 gsl curl hdf4 netcdf-cxx4 nco cdo libyaml FMS xgboost + + - name: Create tarball + run: | + tar --exclude-vcs --exclude=.mepo -cf ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.MAPL.tar ${{ github.event.repository.name }}-${{ github.event.release.tag_name }} + xz -T6 ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.MAPL.tar + + - name: Upload tarball + run: | + gh release upload ${{ github.event.release.tag_name }} ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.MAPL.tar.xz -R ${{ github.repository_owner }}/${{ github.event.repository.name }} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + diff --git a/Base.mk b/Base.mk index d26e57a..acce2f8 100644 --- a/Base.mk +++ b/Base.mk @@ -341,6 +341,15 @@ ifeq ($(ESMF_COMM),openmpi) MPIFC := mpifort else + ifeq ($(ESMF_COMM),mpt) + ifneq ($(wildcard $(shell which mpif08 2> /dev/null)),) + MPIFC := mpif08 + else + ifneq ($(wildcard $(shell which mpif90 2> /dev/null)),) + MPIFC := mpif90 + endif + endif + else ifneq ($(wildcard $(shell which mpifort 2> /dev/null)),) MPIFC := mpifort else @@ -352,6 +361,7 @@ endif endif endif + endif # ESMF_COMPILER Fixup # ------------------- diff --git a/CHANGELOG.md b/CHANGELOG.md index 07b8917..08fa473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,23 @@ ### Removed ### Added +## [7.26.1] - 2024-10-04 + +### Fixed + +- Building with GCC 14 + MPT on PFE showed the need to use `mpif08` when building HDF5. So, if `mpif08` is detected with MPT, we use + it as `MPIFC` +- If not building internal curl, we set `--disable-byterange` with netCDF + +### Changed + +- Add new `BUILD=MAPL` to build only libraries needed for MAPL +- Added `nccmp` to the essential libraries (and MAPL) + +### Added + +- Added GitHub action to build a MAPL tarball + ## [7.26.0] - 2024-09-10 ### Updates diff --git a/GNUmakefile b/GNUmakefile index 2524a66..3c130c0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -292,6 +292,12 @@ ALLDIRS = antlr2 gsl jpeg zlib szlib curl hdf4 hdf5 netcdf netcdf-fortran netcdf GFE \ hdfeos hdfeos5 SDPToolkit +ESSENTIAL_DIRS = jpeg zlib szlib hdf4 hdf5 netcdf netcdf-fortran \ + udunits2 nccmp esmf GFE + +MAPL_DIRS = jpeg zlib szlib hdf5 netcdf netcdf-fortran \ + udunits2 nccmp esmf GFE + ifeq ($(ARCH),Darwin) NO_DARWIN_DIRS = netcdf-cxx4 hdfeos hdfeos5 SDPToolkit ALLDIRS := $(filter-out $(NO_DARWIN_DIRS),$(ALLDIRS)) @@ -302,6 +308,8 @@ endif ifeq ($(findstring nagfor,$(notdir $(FC))),nagfor) NO_NAG_DIRS = cdo ALLDIRS := $(filter-out $(NO_NAG_DIRS),$(ALLDIRS)) + ESSENTIAL_DIRS := $(filter-out $(NO_NAG_DIRS),$(ESSENTIAL_DIRS)) + MAPL_DIRS := $(filter-out $(NO_NAG_DIRS),$(MAPL_DIRS)) endif # NVHPC seems to have issues with SDPToolkit @@ -310,9 +318,6 @@ ifeq ($(findstring nvfortran,$(notdir $(FC))),nvfortran) ALLDIRS := $(filter-out $(NO_NVHPC_DIRS),$(ALLDIRS)) endif -ESSENTIAL_DIRS = jpeg zlib szlib hdf4 hdf5 netcdf netcdf-fortran \ - udunits2 esmf GFE - ifeq ($(MACH),aarch64) NO_ARM_DIRS = hdf4 hdfeos hdfeos5 SDPToolkit ALLDIRS := $(filter-out $(NO_ARM_DIRS),$(ALLDIRS)) @@ -325,6 +330,12 @@ INC_SUPP := $(foreach subdir, \ / /zlib /szlib /jpeg /hdf5 /hdf /netcdf,\ -I$(prefix)/include$(subdir) $(INC_EXTRA) ) else +ifeq ('$(BUILD)','MAPL') +SUBDIRS = $(MAPL_DIRS) +INC_SUPP := $(foreach subdir, \ + / /zlib /szlib /jpeg /hdf5 /netcdf,\ + -I$(prefix)/include$(subdir) $(INC_EXTRA) ) +else ifeq ('$(BUILD)','GFE') SUBDIRS = GFE else @@ -334,6 +345,7 @@ INC_SUPP := $(foreach subdir, \ -I$(prefix)/include$(subdir) $(INC_EXTRA) ) endif endif +endif ifeq ($(findstring hdf4,$(SUBDIRS)),hdf4) ENABLE_HDF4 = --enable-hdf4 @@ -607,6 +619,7 @@ hdf5.config :: hdf5/README.md szlib.install $(ZLIB_INSTALL) CFLAGS="$(CFLAGS) $(HDF5_NCCS_MPT_CFLAG)" FCFLAGS="$(NAG_FCFLAGS)" CC=$(NC_CC) FC=$(NC_FC) CXX=$(NC_CXX) F77=$(NC_F77) ) touch $@ +NETCDF_BYTERANGE = --enable-byterange ifneq ("$(wildcard $(prefix)/bin/curl-config)","") BUILD_DAP = --enable-dap LIB_CURL = $(shell $(prefix)/bin/curl-config --libs) $(DARWIN_ST_LIBS) @@ -616,6 +629,7 @@ endif else BUILD_DAP = --disable-dap LIB_CURL = +NETCDF_BYTERANGE = --disable-byterange endif netcdf.config : netcdf/configure @echo "Configuring netcdf $*" @@ -630,6 +644,7 @@ netcdf.config : netcdf/configure $(ENABLE_HDF4) \ $(BUILD_DAP) \ $(NC_PAR_TESTS) \ + $(NETCDF_BYTERANGE) \ --disable-shared \ --disable-examples \ --enable-netcdf-4 \ diff --git a/README.md b/README.md index 0491cc5..bcd090c 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,11 @@ compiler under Linux, just enter this Use this to only build the libraries essential for building and running GEOS GCM +- `BUILD=MAPL` + + Use this to only build the libraries essential for building and + running MAPL + - `CONFIG_SETUP` This is to help detail what combination of compiler and diff --git a/VERSION b/VERSION index 045169b..cff98fe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.26.0 +7.26.1