Skip to content

Building UFS S2S model using compile.sh script

Minsuk Ji edited this page Oct 6, 2020 · 2 revisions

Compile.sh for UFS-S2S-model

  • Build system continues to be GNUmakefile
  • Compile.sh
    • No longer requires *.appBuilder file
    • Located in ufs-s2s-model/tests/
  • Compile.sh parses build options and passes them onto GNUmakefile

Stand-alone usage

  • compile.sh path target [ make_opt [ name [ clean_before [ clean_after ]]]]
  • arg 1 (path): path to ufs-s2s-model/FV3/ (e.g., ../FV3 if invoked from ufs-s2s-model/tests/)
  • arg 2 (target): machine/compiler combination (e.g., hera.intel, orion.intel)
  • arg 3 (make_opt): make option (optional, see next slide)
  • arg 4 (name): suffix to the exe file name to be generated in ufs-s2s-model/tests/ (optional, fcst.exe is generated if not specified, fcst_name.exe otherwise)
  • arg 5 (clean_before): clean before build (optional, defaults to yes)
  • arg 6 (clean_after): clean after build (optional, defaults to yes)

Specify make options

  • Specify components to build, e.g.,
    • MOM6=Y
    • CICE=Y
    • WW3=Y
    • CMEPS=Y
  • Build with CCPP, e.g.,
    • CCPP=Y SUITES=FV3_GFS_2017_coupled
    • CCPP=Y SUITES=FV3_GFS_v15p2_coupled
  • Build in debug mode
    • DEBUG=Y
  • Putting everything together, e.g.,
    • CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled MOM6=Y CICE=Y WW3=Y CMEPS=Y

Stand-alone usage examples

  • Assume you are in ufs-s2s-model/tests/ directory on Hera
  • ./compile.sh ../FV3 hera.intel
    • no make_opt specified; build FV3 only
    • fcst.exe generated
    • clean before & after build
  • ./compile.sh ../FV3 hera.intel '' 1
    • no make_opt specified; build FV3 only
    • fcst_1.exe generated
    • clean before & after build
  • ./compile.sh ../FV3 hera.intel 'CCPP=Y SUITES=FV3_GFS_2017_coupled WW3=Y' 2 no
    • build FV3+CCPP+WW3
    • fcst_2.exe generated
    • do not clean before build; clean after build
  • ./compile.sh ../FV3 hera.intel 'DEBUG=Y MOM6=Y CICE=Y' coupled no no
    • build FV3+MOM6+CICE in debug mode
    • fcst_coupled.exe generated
    • do not clean before & after build
  • ./compile.sh ../FV3 hera.intel 'CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled MOM6=Y CICE=Y WW3=Y CMEPS=Y'
    • build FV3+CCPP+MOM6+CICE+WW3+CMEPS
    • fcst.exe generated
    • clean before & after build

Usage with rt.sh (regression testing script, see rt.sh)

  • All args except target (arg 2) and make_opt (arg 3) are specified by rt.sh
  • Define a row in ufs-s2s-model/tests/rt.conf that starts with COMPILE
  • Specify arg 2 in the fourth column (with delimiter | ) of rt.conf
  • Specify arg 3 in the second column (with delimiter | ) of rt.conf
  • Examples:

COMPILE | CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y                 |  | hera.intel  | fv3 |

COMPILE | CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y WW3=Y           |  | hera.intel  | fv3 |

COMPILE | CCPP=Y DEBUG=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y         |  | hera.intel  | fv3 |

COMPILE | CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y CMEPS=Y         |  | hera.intel  | fv3 |

COMPILE | CCPP=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y WW3=Y CMEPS=Y   |  | hera.intel  | fv3 |

COMPILE | CCPP=Y DEBUG=Y SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled MOM6=Y CICE=Y CMEPS=Y |  | orion.intel | fv3 |

Clone this wiki locally