Skip to content

The set of sharedlibs needed by a model should not be hardcoded #4837

@jgfouca

Description

@jgfouca

In build.py, we have the following code:

    if ufs_driver and ufs_driver == "nems" and not cpl_in_complist:
        libs = []
    elif case.get_value("MODEL") == "cesm":
	libs = ["gptl", "pio", "csm_share"]
    elif case.get_value("MODEL") == "e3sm":
        libs = ["gptl", "mct", "spio", "csm_share"]
    else:
        libs = ["gptl", "mct", "pio", "csm_share"]

I propose, instead of having this hardcoded in CIME's build system, this should be a config item in the host model. There's an entry in config_files.xml that is already pretty close:

  <entry id="BUILD_LIB_FILE">
    <type>char</type>
    <values>
      <value lib="kokkos">$SRCROOT/share/build/buildlib.kokkos</value>
      <value lib="gptl">$SRCROOT/share/build/buildlib.gptl</value>
      <value lib="pio">$CIMEROOT/CIME/build_scripts/buildlib.pio</value>
      <value lib="spio">$SRCROOT/share/build/buildlib.spio</value>
      <value lib="mct">$SRCROOT/share/build/buildlib.mct</value>
      <value lib="csm_share">$SRCROOT/share/build/buildlib.csm_share</value>
      <value lib="mpi-serial">$SRCROOT/share/build/buildlib.mpi-serial</value>
      <value lib="cprnc">$CIMEROOT/CIME/build_scripts/buildlib.cprnc</value>
      <value lib="ekat">$SRCROOT/share/build/buildlib.ekat</value>
    </values>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions