From 7ab18856e1ce454f184c633872775ea6a4dcbfd1 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 4 Jun 2024 09:52:01 -0500 Subject: [PATCH 1/2] Add more meshes to Omega CTest utility These were introduced in https://github.com/E3SM-Project/Omega/pull/62. --- utils/omega/ctest/build_and_ctest.template | 2 ++ utils/omega/ctest/omega_ctest.py | 39 ++++++++++++++-------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/utils/omega/ctest/build_and_ctest.template b/utils/omega/ctest/build_and_ctest.template index 304a9de04..48fddf008 100644 --- a/utils/omega/ctest/build_and_ctest.template +++ b/utils/omega/ctest/build_and_ctest.template @@ -46,6 +46,8 @@ cmake \ cd test ln -sfn {{ omega_mesh_filename }} OmegaMesh.nc +ln -sfn {{ omega_planar_mesh_filename }} OmegaPlanarMesh.nc +ln -sfn {{ omega_sphere_mesh_filename }} OmegaSphereMesh.nc {% if run_ctest %} ./omega_ctest.sh diff --git a/utils/omega/ctest/omega_ctest.py b/utils/omega/ctest/omega_ctest.py index df7925c09..0b0e5975b 100755 --- a/utils/omega/ctest/omega_ctest.py +++ b/utils/omega/ctest/omega_ctest.py @@ -12,6 +12,7 @@ def make_build_script(machine, compiler, branch, build_only, mesh_filename, + planar_mesh_filename, sphere_mesh_filename, debug, clean, cmake_flags): """ Make a shell script for checking out Omega and its submodules, building @@ -53,6 +54,8 @@ def make_build_script(machine, compiler, branch, build_only, mesh_filename, metis_root=metis_root, parmetis_root=parmetis_root, omega_mesh_filename=mesh_filename, + omega_planar_mesh_filename=planar_mesh_filename, + omega_sphere_mesh_filename=sphere_mesh_filename, run_ctest=(not build_only), build_type=build_type, clean=clean, @@ -76,19 +79,27 @@ def make_build_script(machine, compiler, branch, build_only, mesh_filename, return script_filename -def download_mesh(config): +def download_meshes(config): """ Download and symlink a mesh to use for testing. """ database_root = config.get('paths', 'database_root') - filepath = 'ocean/omega_ctest/ocean.QU.240km.151209.nc' + base_url = 'https://web.lcrc.anl.gov/public/e3sm/polaris/' - url = 'https://web.lcrc.anl.gov/public/e3sm/inputdata/ocn/mpas-o/oQU240/' \ - 'ocean.QU.240km.151209.nc' - download_path = os.path.join(database_root, filepath) - download_target = download(url, download_path, config) - return download_target + files = ['ocean.QU.240km.151209.nc', + 'PlanarPeriodic48x48.nc', + 'cosine_bell_icos480_initial_state.230220.nc'] + + database_path = 'ocean/omega_ctest' + + download_targets = [] + for filename in files: + download_path = os.path.join(database_root, database_path, filename) + url = f'{base_url}/{database_path}/{filename}' + download_target = download(url, download_path, config) + download_targets.append(download_target) + return download_targets def write_job_script(config, machine, compiler, submit): @@ -196,13 +207,15 @@ def main(): else: build_only = True - mesh_filename = download_mesh(config=config) + mesh_filename, planar_mesh_filename, sphere_mesh_filename = \ + download_meshes(config=config) - script_filename = make_build_script(machine=machine, compiler=compiler, - branch=branch, build_only=build_only, - mesh_filename=mesh_filename, - debug=debug, clean=clean, - cmake_flags=cmake_flags) + script_filename = make_build_script( + machine=machine, compiler=compiler, branch=branch, + build_only=build_only, mesh_filename=mesh_filename, + planar_mesh_filename=planar_mesh_filename, + sphere_mesh_filename=sphere_mesh_filename, + debug=debug, clean=clean, cmake_flags=cmake_flags) # clear environment variables and start fresh with those from login # so spack doesn't get confused by conda From 7887de4479b57676efbb6cf25f4b9d620852daa9 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 4 Jun 2024 09:56:10 -0500 Subject: [PATCH 2/2] Update Omega submodule to current develop Commit [e551602](https://github.com/E3SM-Project/Omega/commit/e551602611e4afb24b208f285eee0f4c7b5bc117) --- e3sm_submodules/Omega | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e3sm_submodules/Omega b/e3sm_submodules/Omega index ca19fa903..e55160261 160000 --- a/e3sm_submodules/Omega +++ b/e3sm_submodules/Omega @@ -1 +1 @@ -Subproject commit ca19fa90312659b8e1452490a2fcfe9eafbb1ee5 +Subproject commit e551602611e4afb24b208f285eee0f4c7b5bc117