CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 3 forks source link

A better way of supporting legacy CABLE build systems #244

Closed SeanBryan51 closed 6 months ago

SeanBryan51 commented 8 months ago

We currently support building legacy CABLE versions via the build_script key, where a path to a build script can be provided for benchcab to execute at the build step. Some issues with this approach are:

  1. Scripts may require arguments or flags. It is currently not possible to specify flags to scripts, only the path to the script can be specified.
  2. Spatial simulations will require multiple executables to be built per version of CABLE (serial and mpi). To support legacy build systems, we will need a way specify multiple build commands for each executable.

This functionality will be needed as most development versions of CABLE will have different build systems, especially when there are significant developments to the CABLE build system for the main branch (e.g. https://github.com/CABLE-LSM/CABLE/pull/200) .

Note, see here for a relevant discussion around this issue.

SeanBryan51 commented 6 months ago

We can add a new parameter that takes in a shell command (or a series of shell commands by specifying a multiline string) run from the root directory of the CABLE repository. For example:

build_run: |
  cd offline
  ./build.sh --some-flag
SeanBryan51 commented 6 months ago

After discussing with @ccarouge, we have decided to add support for spack and to deprecate support for legacy CABLE build systems in benchcab. This adds the requirement that users will only be able to test benchcab on branches that can be built by spack. ACCESS-NRI will help with transitioning legacy build systems to use the latest build system compatible with spack.

Moving to spack will solve existing issues around supporting bespoke build scripts (e.g. #244, #249). This is the best way forward considering support for legacy build systems is a temporary that will be deprecated sooner or later.

Closing this issue.