Skip to content

Commit

Permalink
Backport fixes from v8 baselibs (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 authored Oct 4, 2024
1 parent 6730615 commit d1aec29
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 6 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/release-tarfile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Complete Release Tarball
name: Create Release Tarballs

on:
release:
Expand All @@ -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
Expand All @@ -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}}

10 changes: 10 additions & 0 deletions Base.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -352,6 +361,7 @@
endif
endif
endif
endif

# ESMF_COMPILER Fixup
# -------------------
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 18 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand All @@ -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))
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -616,6 +629,7 @@ endif
else
BUILD_DAP = --disable-dap
LIB_CURL =
NETCDF_BYTERANGE = --disable-byterange
endif
netcdf.config : netcdf/configure
@echo "Configuring netcdf $*"
Expand All @@ -630,6 +644,7 @@ netcdf.config : netcdf/configure
$(ENABLE_HDF4) \
$(BUILD_DAP) \
$(NC_PAR_TESTS) \
$(NETCDF_BYTERANGE) \
--disable-shared \
--disable-examples \
--enable-netcdf-4 \
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.26.0
7.26.1

0 comments on commit d1aec29

Please sign in to comment.