From 265176c424310e4464bfc3e701c829d7da0e7820 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Fri, 7 Oct 2022 16:12:35 -0700 Subject: [PATCH] Speed up test_driver CircleCI plan (#335) ## Purpose This PR updates the test_driver CircleCI plan to cache its gt4py caches for faster execution, and reduces the simulation time of the caching comm example (which is run as part of CI). ## Infrastructure changes: - test_driver circleci plan now caches .gt_cache - read/write examples for caching comm now only run two timesteps instead of one hour --- .circleci/config.yml | 12 +++++++++++- .../examples/configs/baroclinic_c12_comm_read.yaml | 4 ++-- .../examples/configs/baroclinic_c12_comm_write.yaml | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a46298c5..27cef7f53 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -355,12 +355,22 @@ jobs: name: Install Submodules command: git submodule update --init - setup_environment_mpi + - run: + name: save gt4py_version.txt + command: git submodule status external/gt4py | awk '{print $1;}' > gt4py_version.txt + - restore_cache: + keys: + - v1-gt_cache_driver-{{ checksum "gt4py_version.txt" }} - run: name: run tests command: | . venv/bin/activate cd driver - MPIRUN_CALL="mpirun -n 6 --mca btl_vader_single_copy_mechanism none" make test_mpi + GT_CACHE_ROOT=$(pwd)/.gt_cache MPIRUN_CALL="mpirun -n 6 --mca btl_vader_single_copy_mechanism none" make test_mpi + - save_cache: + key: v1-gt_cache_driver-{{ checksum "gt4py_version.txt" }} + paths: + - .gt_cache test_driver_orch_cpu: docker: diff --git a/driver/examples/configs/baroclinic_c12_comm_read.yaml b/driver/examples/configs/baroclinic_c12_comm_read.yaml index 4b3025cd4..03fde07ab 100644 --- a/driver/examples/configs/baroclinic_c12_comm_read.yaml +++ b/driver/examples/configs/baroclinic_c12_comm_read.yaml @@ -17,8 +17,8 @@ comm_config: rank: 0 nx_tile: 12 nz: 79 -dt_atmos: 225 -minutes: 60 +dt_atmos: 180 +minutes: 6 layout: - 1 - 1 diff --git a/driver/examples/configs/baroclinic_c12_comm_write.yaml b/driver/examples/configs/baroclinic_c12_comm_write.yaml index e94df210c..d3eedb5b1 100644 --- a/driver/examples/configs/baroclinic_c12_comm_write.yaml +++ b/driver/examples/configs/baroclinic_c12_comm_write.yaml @@ -18,8 +18,8 @@ comm_config: - 0 nx_tile: 12 nz: 79 -dt_atmos: 225 -minutes: 60 +dt_atmos: 180 +minutes: 6 layout: - 1 - 1