Skip to content

Commit

Permalink
Merge pull request #4509 from sjsprecious/add_gpu_mpas
Browse files Browse the repository at this point in the history
Add GPU flags to MPAS dycore through the CIME infrastructure
  • Loading branch information
jedwards4b authored Nov 2, 2023
2 parents f71bec9 + a9e1dc2 commit 8b2e1ae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CIME/Tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,15 @@ ifdef MPAS_LIBDIR
# this isn't necessary, since libmpas should never be an actual file (the library that is created
# is named libmpas.a), but adding the PHONY declaration provides an extra bit of safety
.PHONY: libmpas
# The CASEROOT, COMPILER and MACH are added so that the Depends file could be visible to
# the MPAS dycore.
# The GPUFLAGS is added so that the GPU flags defined in ccs_config_cesm could also be
# used to build the MPAS dycore if needed.
libmpas: cam_abortutils.o physconst.o
$(MAKE) -C $(MPAS_LIBDIR) CC="$(CC)" FC="$(FC)" PIODEF="$(PIODEF)" FFLAGS='$(FREEFLAGS) $(FFLAGS)' \
FCINCLUDES='$(INCLDIR) $(INCS) -I$(ABS_INSTALL_SHAREDPATH)/include -I$(ABS_ESMF_PATH)/include'
$(MAKE) -C $(MPAS_LIBDIR) CC="$(CC)" FC="$(FC)" PIODEF="$(PIODEF)" \
FFLAGS='$(FREEFLAGS) $(FFLAGS)' GPUFLAGS='$(GPUFLAGS)' \
CASEROOT='$(CASEROOT)' COMPILER='$(COMPILER)' MACH='$(MACH)' \
FCINCLUDES='$(INCLDIR) $(INCS) -I$(ABS_INSTALL_SHAREDPATH)/include -I$(ABS_ESMF_PATH)/include'

dyn_comp.o: libmpas
dyn_grid.o: libmpas
Expand Down

0 comments on commit 8b2e1ae

Please sign in to comment.