Skip to content

Building GOCART Standalone with Spack

Matt Thompson edited this page Jul 30, 2024 · 2 revisions

This page will detail my attempts to build GOCART Standalone using Spack.

For this testing so far, I'm using spack mainline as of 2024-Jul-29 plus https://github.com/spack/spack/pull/45194 as on my Mac, I have gcc 13.3 and need the GFE Updates in that PR.

UFS_GOCART=ON

To build with -DUFS_GOCART=ON you need the feature/mathomp4/test-no-standalone-dev branch from https://github.com/GEOS-ESM/GOCART/pull/273.

I was then able to build with:

module load apple-clang openmpi mapl mepo
cmake -B build-UFS-ON -S . --install-prefix=$(pwd)/install-UFS-ON -DUFS_GOCART=ON
cmake --build build-UFS-ON --parallel 6 --target install

UFS_GOCART=OFF (NOT WORKING)

For this, the modules are the same (well, mapl isn't needed since we'll build MAPL internally for this test).

GOCART Changes

Next, the CMake in ESMF/GOCART needs all the MAPL_cfio_r4 to change to MAPL.

HEMCO Changes

Testing showed some changes are needed in HEMCO. Note that it is hard to figure out how or if any of these should be fed back up to the mothership HEMCO repos as the HEMCO we are currently using is really out of date.

  1. The GNU flags in HEMCO have -mcmodel=medium but this is not a valid flag on Arm Macs with GNU. For now, change to -mcmodel=small say just for building purposes (haven't been able to test yet). (NOTE: HEMCO technically only supports Linux, so this is on me.)
  2. Change an INTERFACE MAPL.base in HEMCO to INTERFACE MAPL
Clone this wiki locally