diff --git a/.github/workflows/clang-compile-tests.yml b/.github/workflows/clang-compile-tests.yml index 379ae4946..873cef99b 100644 --- a/.github/workflows/clang-compile-tests.yml +++ b/.github/workflows/clang-compile-tests.yml @@ -17,7 +17,7 @@ jobs: - name: clang-format run: | - sudo apt-get update + sudo apt update sudo apt install clang-format cd core/src clang-format --dry-run -Werror *cpp include/*hpp @@ -48,6 +48,7 @@ jobs: - name: run serial tests run: | . /opt/spack-environment/activate.sh + apt update apt install -y wget cd build (cd core/test && wget "ftp://ftp.nersc.no/nextsim/netCDF/partition_metadata_1.nc") @@ -85,6 +86,7 @@ jobs: - name: run MPI tests run: | . /opt/spack-environment/activate.sh + apt update apt install -y wget cd build (cd core/test && wget "ftp://ftp.nersc.no/nextsim/netCDF/partition_metadata_1.nc") diff --git a/core/src/ModelMetadata.cpp b/core/src/ModelMetadata.cpp index c76d426ce..d30597ec6 100644 --- a/core/src/ModelMetadata.cpp +++ b/core/src/ModelMetadata.cpp @@ -1,7 +1,7 @@ /*! * @file ModelMetadata.cpp * - * @date Jun 29, 2022 + * @date 21 August 2024 * @author Tim Spain */ @@ -49,14 +49,14 @@ void ModelMetadata::getPartitionMetadata(std::string partitionFile) + std::to_string(nBoxes) + "\n"; throw std::runtime_error(errorMsg); } - globalExtentX = ncFile.getDim("globalX").getSize(); - globalExtentY = ncFile.getDim("globalY").getSize(); + globalExtentX = ncFile.getDim("NX").getSize(); + globalExtentY = ncFile.getDim("NY").getSize(); netCDF::NcGroup bboxGroup(ncFile.getGroup(bboxName)); std::vector index(1, mpiMyRank); - bboxGroup.getVar("global_x").getVar(index, &localCornerX); - bboxGroup.getVar("global_y").getVar(index, &localCornerY); - bboxGroup.getVar("local_extent_x").getVar(index, &localExtentX); - bboxGroup.getVar("local_extent_y").getVar(index, &localExtentY); + bboxGroup.getVar("domain_x").getVar(index, &localCornerX); + bboxGroup.getVar("domain_y").getVar(index, &localCornerY); + bboxGroup.getVar("domain_extent_x").getVar(index, &localExtentX); + bboxGroup.getVar("domain_extent_y").getVar(index, &localExtentY); ncFile.close(); } diff --git a/core/test/partition_metadata_2.cdl b/core/test/partition_metadata_2.cdl index c500e440e..0c9abc2f5 100644 --- a/core/test/partition_metadata_2.cdl +++ b/core/test/partition_metadata_2.cdl @@ -1,7 +1,7 @@ netcdf partition_metadata_2 { dimensions: - globalX = 10 ; - globalY = 9 ; + NX = 10 ; + NY = 9 ; P = 2 ; T = 1 ; B = 1 ; @@ -10,19 +10,19 @@ dimensions: group: bounding_boxes { variables: - int global_x(P) ; - int global_y(P) ; - int local_extent_x(P) ; - int local_extent_y(P) ; + int domain_x(P) ; + int domain_y(P) ; + int domain_extent_x(P) ; + int domain_extent_y(P) ; data: - global_x = 0, 4 ; + domain_x = 0, 4 ; - global_y = 0, 0 ; + domain_y = 0, 0 ; - local_extent_x = 4, 6 ; + domain_extent_x = 4, 6 ; - local_extent_y = 9, 9 ; + domain_extent_y = 9, 9 ; } // group bounding_boxes group: connectivity { diff --git a/core/test/partition_metadata_3.cdl b/core/test/partition_metadata_3.cdl index 79127adc6..b70696991 100644 --- a/core/test/partition_metadata_3.cdl +++ b/core/test/partition_metadata_3.cdl @@ -1,7 +1,7 @@ netcdf partition_metadata_3 { dimensions: - globalX = 5 ; - globalY = 7 ; + NX = 5 ; + NY = 7 ; P = 3 ; T = 2 ; B = 2 ; @@ -10,19 +10,19 @@ dimensions: group: bounding_boxes { variables: - int global_x(P) ; - int global_y(P) ; - int local_extent_x(P) ; - int local_extent_y(P) ; + int domain_x(P) ; + int domain_y(P) ; + int domain_extent_x(P) ; + int domain_extent_y(P) ; data: - global_x = 0, 0, 3 ; + domain_x = 0, 0, 3 ; - global_y = 0, 3, 0 ; + domain_y = 0, 3, 0 ; - local_extent_x = 3, 3, 2 ; + domain_extent_x = 3, 3, 2 ; - local_extent_y = 3, 4, 7 ; + domain_extent_y = 3, 4, 7 ; } // group bounding_boxes group: connectivity { diff --git a/run/partition.cdl b/run/partition.cdl index f19b3b154..e7db9d3f1 100644 --- a/run/partition.cdl +++ b/run/partition.cdl @@ -3,24 +3,24 @@ netcdf partition { dimensions: P = 1 ; L = 1 ; - globalX = 30 ; - globalY = 30 ; + NX = 30 ; + NY = 30 ; group: bounding_boxes { variables: - int global_x(P) ; - int global_y(P) ; - int local_extent_x(P) ; - int local_extent_y(P) ; + int domain_x(P) ; + int domain_y(P) ; + int domain_extent_x(P) ; + int domain_extent_y(P) ; data: - global_x = 0 ; + domain_x = 0 ; - global_y = 0 ; + domain_y = 0 ; - local_extent_x = 30 ; + domain_extent_x = 30 ; - local_extent_y = 30 ; + domain_extent_y = 30 ; } // group bounding_boxes } diff --git a/run/partition_metadata_2.cdl b/run/partition_metadata_2.cdl index 12000f53a..226739429 100644 --- a/run/partition_metadata_2.cdl +++ b/run/partition_metadata_2.cdl @@ -1,8 +1,8 @@ // partition_metadata_2.cdl netcdf partition_metadata_2 { dimensions: - globalX = 30 ; - globalY = 30 ; + NX = 30 ; + NY = 30 ; P = 2 ; T = UNLIMITED ; // (0 currently) B = UNLIMITED ; // (0 currently) @@ -11,19 +11,19 @@ dimensions: group: bounding_boxes { variables: - int global_x(P) ; - int global_y(P) ; - int local_extent_x(P) ; - int local_extent_y(P) ; + int domain_x(P) ; + int domain_y(P) ; + int domain_extent_x(P) ; + int domain_extent_y(P) ; data: - global_x = 0, 0 ; + domain_x = 0, 0 ; - global_y = 0, 16 ; + domain_y = 0, 16 ; - local_extent_x = 30, 30 ; + domain_extent_x = 30, 30 ; - local_extent_y = 16, 14 ; + domain_extent_y = 16, 14 ; } // group bounding_boxes group: connectivity {