From 50f8d6a574a25e19c2d0095690caa4bd4c9fb0c8 Mon Sep 17 00:00:00 2001 From: Alice Barthel Date: Thu, 26 Mar 2026 10:12:21 -0700 Subject: [PATCH 1/3] modified the Eos array size and loop bounds to NCellsSize --- components/omega/src/ocn/Eos.cpp | 18 +++---- components/omega/test/ocn/EosTest.cpp | 76 +++++++++++++-------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/components/omega/src/ocn/Eos.cpp b/components/omega/src/ocn/Eos.cpp index 1b49fe400eea..f98b0f5cb437 100644 --- a/components/omega/src/ocn/Eos.cpp +++ b/components/omega/src/ocn/Eos.cpp @@ -39,11 +39,11 @@ Eos::Eos(const std::string &Name, ///< [in] Name for eos object ComputeBruntVaisalaFreqSqLinear(VCoord), ComputeBruntVaisalaFreqSqTeos10(VCoord), Name(Name), Mesh(Mesh), VCoord(VCoord) { - SpecVol = Array2DReal("SpecVol", Mesh->NCellsAll, VCoord->NVertLayers); + SpecVol = Array2DReal("SpecVol", Mesh->NCellsSize, VCoord->NVertLayers); SpecVolDisplaced = - Array2DReal("SpecVolDisplaced", Mesh->NCellsAll, VCoord->NVertLayers); + Array2DReal("SpecVolDisplaced", Mesh->NCellsSize, VCoord->NVertLayers); BruntVaisalaFreqSq = - Array2DReal("BruntVaisalaFreqSq", Mesh->NCellsAll, VCoord->NVertLayers); + Array2DReal("BruntVaisalaFreqSq", Mesh->NCellsSize, VCoord->NVertLayers); defineFields(); } @@ -138,7 +138,7 @@ void Eos::computeSpecVol(const Array2DReal &ConservTemp, /// Dispatch to the correct EOS calculation if (EosChoice == EosType::LinearEos) { parallelForOuter( - "eos-linear", {Mesh->NCellsAll}, + "eos-linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -152,7 +152,7 @@ void Eos::computeSpecVol(const Array2DReal &ConservTemp, }); } else if (EosChoice == EosType::Teos10Eos) { parallelForOuter( - "eos-teos10", {Mesh->NCellsAll}, + "eos-teos10", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -189,7 +189,7 @@ void Eos::computeSpecVolDisp(const Array2DReal &ConservTemp, /// volume is the same as the specific volume if (EosChoice == EosType::LinearEos) { parallelForOuter( - "eos-linear", {Mesh->NCellsAll}, + "eos-linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -202,7 +202,7 @@ void Eos::computeSpecVolDisp(const Array2DReal &ConservTemp, }); } else if (EosChoice == EosType::Teos10Eos) { parallelForOuter( - "eos-teos10", {Mesh->NCellsAll}, + "eos-teos10", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -240,7 +240,7 @@ void Eos::computeBruntVaisalaFreqSq(const Array2DReal &ConservTemp, if (EosChoice == EosType::LinearEos) { /// If Linear EOS, use linear squared Brunt-Vaisala frequency calculation parallelForOuter( - "bvf-linear", {Mesh->NCellsAll}, + "bvf-linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -255,7 +255,7 @@ void Eos::computeBruntVaisalaFreqSq(const Array2DReal &ConservTemp, /// If TEOS-10 EOS, use TEOS-10 squared Brunt-Vaisala frequency /// calculation parallelForOuter( - "bvf-teos10", {Mesh->NCellsAll}, + "bvf-teos10", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); diff --git a/components/omega/test/ocn/EosTest.cpp b/components/omega/test/ocn/EosTest.cpp index 5202594abedb..29cd18bfb6ea 100644 --- a/components/omega/test/ocn/EosTest.cpp +++ b/components/omega/test/ocn/EosTest.cpp @@ -107,15 +107,15 @@ void testEosLinear() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::LinearEos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use Kokkos::deep_copy to fill the entire view with the ref value deepCopy(SArray, Sa); deepCopy(TArray, Ct); @@ -132,7 +132,7 @@ void testEosLinear() { int NumMismatches = 0; Array2DReal SpecVol = TestEos->SpecVol; parallelReduceOuter( - "CheckSpecVolMatrix-linear", {Mesh->NCellsAll}, + "CheckSpecVolMatrix-linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -156,7 +156,7 @@ void testEosLinear() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolH = createHostMirrorCopy(TestEos->SpecVol); - for (int I = 0; I < NCellsAll; ++I) { + for (int I = 0; I < NCellsSize; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Linear Bad Value: " @@ -177,15 +177,15 @@ void testEosLinearDisplaced() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::LinearEos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use Kokkos::deep_copy to fill the entire view with the ref value deepCopy(SArray, Sa); deepCopy(TArray, Ct); @@ -202,7 +202,7 @@ void testEosLinearDisplaced() { int NumMismatches = 0; Array2DReal SpecVolDisplaced = TestEos->SpecVolDisplaced; parallelReduceOuter( - "CheckSpecVolDispMatrix-linear", {Mesh->NCellsAll}, + "CheckSpecVolDispMatrix-linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -227,7 +227,7 @@ void testEosLinearDisplaced() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolDisplacedH = createHostMirrorCopy(SpecVolDisplaced); - for (int I = 0; I < NCellsAll; ++I) { + for (int I = 0; I < NCellsSize; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolDisplacedH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Linear Displaced Bad Value: " @@ -248,15 +248,15 @@ void testBruntVaisalaFreqSqLinear() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::LinearEos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use deep copy to initialize results to zero deepCopy(TestEos->SpecVol, 0.0); deepCopy(TestEos->BruntVaisalaFreqSq, 0.0); @@ -265,7 +265,7 @@ void testBruntVaisalaFreqSqLinear() { // for K = 1. OMEGA_SCOPE(ZMid, VCoord->ZMid); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { if (K == 0) { ZMid(ICell, 0) = -992.1173890198451_Real; @@ -304,7 +304,7 @@ void testBruntVaisalaFreqSqLinear() { int NumMismatches = 0; OMEGA_SCOPE(BruntVaisalaFreqSq, TestEos->BruntVaisalaFreqSq); parallelReduceOuter( - "CheckBruntVaisalaSq-Linear", {Mesh->NCellsAll}, + "CheckBruntVaisalaSq-Linear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -338,7 +338,7 @@ void testBruntVaisalaFreqSqLinear() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto BruntVaisalaFreqSqH = createHostMirrorCopy(BruntVaisalaFreqSq); - for (int I = 0; I < NCellsAll; ++I) { + for (int I = 0; I < NCellsSize; ++I) { // top layer should be zero if (BruntVaisalaFreqSqH(I, 0) != 0.0) LOG_ERROR("EosTest: Brunt-Vaisala Linear Bad Value: " @@ -372,15 +372,15 @@ void testEosTeos10() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::Teos10Eos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use Kokkos::deep_copy to fill the entire view with the ref value deepCopy(SArray, Sa); deepCopy(TArray, Ct); @@ -397,7 +397,7 @@ void testEosTeos10() { int NumMismatches = 0; Array2DReal SpecVol = TestEos->SpecVol; parallelReduceOuter( - "CheckSpecVolMatrix-Teos", {Mesh->NCellsAll}, + "CheckSpecVolMatrix-Teos", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -421,7 +421,7 @@ void testEosTeos10() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolH = createHostMirrorCopy(SpecVol); - for (int I = 0; I < NCellsAll; ++I) { + for (int I = 0; I < NCellsSize; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol TEOS Bad Value: " @@ -442,15 +442,15 @@ void testEosTeos10Displaced() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::Teos10Eos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use Kokkos::deep_copy to fill the entire view with the ref value deepCopy(SArray, Sa); deepCopy(TArray, Ct); @@ -467,7 +467,7 @@ void testEosTeos10Displaced() { int NumMismatches = 0; Array2DReal SpecVolDisplaced = TestEos->SpecVolDisplaced; parallelReduceOuter( - "CheckSpecVolDispMatrix-Teos", {Mesh->NCellsAll}, + "CheckSpecVolDispMatrix-Teos", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -492,7 +492,7 @@ void testEosTeos10Displaced() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolDisplacedH = createHostMirrorCopy(SpecVolDisplaced); - for (int I = 0; I < NCellsAll; ++I) { + for (int I = 0; I < NCellsSize; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolDisplacedH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Displaced TEOS Bad Value: " @@ -513,15 +513,15 @@ void testBruntVaisalaFreqSqTeos10() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; /// Get Eos instance to test Eos *TestEos = Eos::getInstance(); TestEos->EosChoice = EosType::Teos10Eos; /// Create and fill ocean state arrays - Array2DReal SArray = Array2DReal("SArray", NCellsAll, NVertLayers); - Array2DReal TArray = Array2DReal("TArray", NCellsAll, NVertLayers); - Array2DReal PArray = Array2DReal("PArray", NCellsAll, NVertLayers); + Array2DReal SArray = Array2DReal("SArray", NCellsSize, NVertLayers); + Array2DReal TArray = Array2DReal("TArray", NCellsSize, NVertLayers); + Array2DReal PArray = Array2DReal("PArray", NCellsSize, NVertLayers); /// Use deep copy to initialize results to zero deepCopy(TestEos->BruntVaisalaFreqSq, 0.0); deepCopy(TestEos->SpecVol, 0.0); @@ -529,7 +529,7 @@ void testBruntVaisalaFreqSqTeos10() { /// Fill inputs with values that should lead to ref result for K=1 OMEGA_SCOPE(ZMid, VCoord->ZMid); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { if (K == 0) { ZMid(ICell, 0) = -992.1173890198451_Real; @@ -568,7 +568,7 @@ void testBruntVaisalaFreqSqTeos10() { int NumMismatches = 0; OMEGA_SCOPE(BruntVaisalaFreqSq, TestEos->BruntVaisalaFreqSq); parallelReduceOuter( - "CheckSpecVolMatrix-Teos", {Mesh->NCellsAll}, + "CheckSpecVolMatrix-Teos", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -602,7 +602,7 @@ void testBruntVaisalaFreqSqTeos10() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto BruntVaisalaFreqSqH = createHostMirrorCopy(BruntVaisalaFreqSq); - for (int ICell = 0; ICell < NCellsAll; ++ICell) { + for (int ICell = 0; ICell < NCellsSize; ++ICell) { // top layer should be zero if (BruntVaisalaFreqSqH(ICell, 0) != 0.0) LOG_ERROR("EosTest: Brunt-Vaisala TEOS Bad Value: " From 221dd32d26275bc436ed73b44255d40a492c690e Mon Sep 17 00:00:00 2001 From: Alice Barthel Date: Thu, 26 Mar 2026 10:43:22 -0700 Subject: [PATCH 2/3] modified the vertMix array size and loop bounds --- components/omega/src/ocn/VertMix.cpp | 12 +++---- components/omega/test/ocn/VertMixTest.cpp | 41 +++++++++++------------ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/components/omega/src/ocn/VertMix.cpp b/components/omega/src/ocn/VertMix.cpp index f0e0db9a7055..0b78f5a86836 100644 --- a/components/omega/src/ocn/VertMix.cpp +++ b/components/omega/src/ocn/VertMix.cpp @@ -32,8 +32,8 @@ VertMix::VertMix(const std::string &Name, ///< [in] Name for VertMix object ) : ComputeVertMixConv(VCoord), ComputeVertMixShear(Mesh, VCoord), Name(Name), Mesh(Mesh), VCoord(VCoord) { - VertDiff = Array2DReal("VertDiff", Mesh->NCellsAll, VCoord->NVertLayers); - VertVisc = Array2DReal("VertVisc", Mesh->NCellsAll, VCoord->NVertLayers); + VertDiff = Array2DReal("VertDiff", Mesh->NCellsSize, VCoord->NVertLayers); + VertVisc = Array2DReal("VertVisc", Mesh->NCellsSize, VCoord->NVertLayers); defineFields(); } @@ -177,7 +177,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, /// Dispatch to the correct VertMix calculation if (LocComputeVertMixShear.Enabled && LocComputeVertMixConv.Enabled) { parallelForOuter( - "VertMix-ConvPlusShear", {Mesh->NCellsAll}, + "VertMix-ConvPlusShear", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -194,7 +194,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else if (LocComputeVertMixShear.Enabled) { parallelForOuter( - "VertMix-ShearOnly", {Mesh->NCellsAll}, + "VertMix-ShearOnly", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -209,7 +209,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else if (LocComputeVertMixConv.Enabled) { parallelForOuter( - "VertMix-ConvOnly", {Mesh->NCellsAll}, + "VertMix-ConvOnly", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -223,7 +223,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else { parallelFor( - "VertMix-Background", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell) { + "VertMix-Background", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell) { LocVertDiff(ICell, 0) = 0.0_Real; LocVertVisc(ICell, 0) = 0.0_Real; }); diff --git a/components/omega/test/ocn/VertMixTest.cpp b/components/omega/test/ocn/VertMixTest.cpp index 9c0cf2101867..bf3df79f0189 100644 --- a/components/omega/test/ocn/VertMixTest.cpp +++ b/components/omega/test/ocn/VertMixTest.cpp @@ -105,7 +105,6 @@ void testBackVertMix() { VCoord->NVertLayers = NVertLayers; I4 NCellsSize = Mesh->NCellsSize; I4 NEdgesSize = Mesh->NEdgesSize; - I4 NCellsAll = Mesh->NCellsAll; I4 NEdgesAll = Mesh->NEdgesAll; OMEGA_SCOPE(ZMid, VCoord->ZMid); @@ -126,7 +125,7 @@ void testBackVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; }); parallelFor( @@ -153,7 +152,7 @@ void testBackVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-BackgroundVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-BackgroundVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -188,7 +187,7 @@ void testBackVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-BackgroundDiff", {Mesh->NCellsAll}, + "CheckVertMixMatrix-BackgroundDiff", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -231,7 +230,7 @@ void testConvVertMix() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; I4 NEdgesAll = Mesh->NEdgesAll; OMEGA_SCOPE(ZMid, VCoord->ZMid); @@ -242,7 +241,7 @@ void testConvVertMix() { auto NormalVelEdge = Array2DReal("NormalVelEdge", NEdgesAll, NVertLayers); auto TangVelEdge = Array2DReal("TangVelEdge", NEdgesAll, NVertLayers); auto BruntVaisalaFreqSqCell = - Array2DReal("BruntVaisalaFreqSqCell", NCellsAll, NVertLayers); + Array2DReal("BruntVaisalaFreqSqCell", NCellsSize, NVertLayers); /// Use deep copy to initialize with the ref value deepCopy(NormalVelEdge, NV); @@ -252,7 +251,7 @@ void testConvVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; }); parallelFor( @@ -279,7 +278,7 @@ void testConvVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ConvectiveVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-ConvectiveVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -316,7 +315,7 @@ void testConvVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ConvectiveDiff", {Mesh->NCellsAll}, + "CheckVertMixMatrix-ConvectiveDiff", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -358,7 +357,7 @@ void testShearVertMix() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; I4 NEdgesAll = Mesh->NEdgesAll; OMEGA_SCOPE(ZMid, VCoord->ZMid); OMEGA_SCOPE(NEdgesOnCell, Mesh->NEdgesOnCell); @@ -373,7 +372,7 @@ void testShearVertMix() { auto NormalVelEdge = Array2DReal("NormalVelEdge", NEdgesAll, NVertLayers); auto TangVelEdge = Array2DReal("TangVelEdge", NEdgesAll, NVertLayers); auto BruntVaisalaFreqSqCell = - Array2DReal("BruntVaisalaFreqSqCell", NCellsAll, NVertLayers); + Array2DReal("BruntVaisalaFreqSqCell", NCellsSize, NVertLayers); /// Use Kokkos::deep_copy to fill the entire view with the ref value deepCopy(NormalVelEdge, NV); @@ -383,7 +382,7 @@ void testShearVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; NEdgesOnCell(ICell) = 5; @@ -416,7 +415,7 @@ void testShearVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -459,7 +458,7 @@ void testShearVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -508,7 +507,7 @@ void testTotalVertMix() { const auto Mesh = HorzMesh::getDefault(); const auto VCoord = VertCoord::getDefault(); VCoord->NVertLayers = NVertLayers; - I4 NCellsAll = Mesh->NCellsAll; + I4 NCellsSize = Mesh->NCellsSize; I4 NEdgesAll = Mesh->NEdgesAll; OMEGA_SCOPE(ZMid, VCoord->ZMid); OMEGA_SCOPE(NEdgesOnCell, Mesh->NEdgesOnCell); @@ -523,7 +522,7 @@ void testTotalVertMix() { auto NormalVelEdge = Array2DReal("NormalVelEdge", NEdgesAll, NVertLayers); auto TangVelEdge = Array2DReal("TangVelEdge", NEdgesAll, NVertLayers); auto BruntVaisalaFreqSqCell = - Array2DReal("BruntVaisalaFreqSqCell", NCellsAll, NVertLayers); + Array2DReal("BruntVaisalaFreqSqCell", NCellsSize, NVertLayers); /// Use deep copy to initialize with the ref value deepCopy(NormalVelEdge, NV); @@ -535,7 +534,7 @@ void testTotalVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsAll, NVertLayers}, + "populateArrays", {NCellsSize, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; NEdgesOnCell(ICell) = 5; @@ -568,7 +567,7 @@ void testTotalVertMix() { /// Check all VertDiff array values against expected value int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalPosDiff", {Mesh->NCellsAll}, + "CheckVertMixMatrix-TotalPosDiff", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -610,7 +609,7 @@ void testTotalVertMix() { /// Check all VertVisc array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalPosVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-TotalPosVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -663,7 +662,7 @@ void testTotalVertMix() { /// Check all VertDiff array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalNegDiff", {Mesh->NCellsAll}, + "CheckVertMixMatrix-TotalNegDiff", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -705,7 +704,7 @@ void testTotalVertMix() { /// Check all VertVisc array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalNegVisc", {Mesh->NCellsAll}, + "CheckVertMixMatrix-TotalNegVisc", {Mesh->NCellsSize}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); From 0a56ad7e76bd4daae2da4d62cf184e4a3095b597 Mon Sep 17 00:00:00 2001 From: Alice Barthel Date: Thu, 26 Mar 2026 16:57:34 -0700 Subject: [PATCH 3/3] reverting the loop bound changes --- components/omega/src/ocn/Eos.cpp | 12 +++++----- components/omega/src/ocn/VertMix.cpp | 8 +++---- components/omega/test/ocn/EosTest.cpp | 28 +++++++++++------------ components/omega/test/ocn/VertMixTest.cpp | 28 +++++++++++------------ 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/components/omega/src/ocn/Eos.cpp b/components/omega/src/ocn/Eos.cpp index f98b0f5cb437..1728595939cb 100644 --- a/components/omega/src/ocn/Eos.cpp +++ b/components/omega/src/ocn/Eos.cpp @@ -138,7 +138,7 @@ void Eos::computeSpecVol(const Array2DReal &ConservTemp, /// Dispatch to the correct EOS calculation if (EosChoice == EosType::LinearEos) { parallelForOuter( - "eos-linear", {Mesh->NCellsSize}, + "eos-linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -152,7 +152,7 @@ void Eos::computeSpecVol(const Array2DReal &ConservTemp, }); } else if (EosChoice == EosType::Teos10Eos) { parallelForOuter( - "eos-teos10", {Mesh->NCellsSize}, + "eos-teos10", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -189,7 +189,7 @@ void Eos::computeSpecVolDisp(const Array2DReal &ConservTemp, /// volume is the same as the specific volume if (EosChoice == EosType::LinearEos) { parallelForOuter( - "eos-linear", {Mesh->NCellsSize}, + "eos-linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -202,7 +202,7 @@ void Eos::computeSpecVolDisp(const Array2DReal &ConservTemp, }); } else if (EosChoice == EosType::Teos10Eos) { parallelForOuter( - "eos-teos10", {Mesh->NCellsSize}, + "eos-teos10", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -240,7 +240,7 @@ void Eos::computeBruntVaisalaFreqSq(const Array2DReal &ConservTemp, if (EosChoice == EosType::LinearEos) { /// If Linear EOS, use linear squared Brunt-Vaisala frequency calculation parallelForOuter( - "bvf-linear", {Mesh->NCellsSize}, + "bvf-linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -255,7 +255,7 @@ void Eos::computeBruntVaisalaFreqSq(const Array2DReal &ConservTemp, /// If TEOS-10 EOS, use TEOS-10 squared Brunt-Vaisala frequency /// calculation parallelForOuter( - "bvf-teos10", {Mesh->NCellsSize}, + "bvf-teos10", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); diff --git a/components/omega/src/ocn/VertMix.cpp b/components/omega/src/ocn/VertMix.cpp index 0b78f5a86836..d43358a662c7 100644 --- a/components/omega/src/ocn/VertMix.cpp +++ b/components/omega/src/ocn/VertMix.cpp @@ -177,7 +177,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, /// Dispatch to the correct VertMix calculation if (LocComputeVertMixShear.Enabled && LocComputeVertMixConv.Enabled) { parallelForOuter( - "VertMix-ConvPlusShear", {Mesh->NCellsSize}, + "VertMix-ConvPlusShear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -194,7 +194,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else if (LocComputeVertMixShear.Enabled) { parallelForOuter( - "VertMix-ShearOnly", {Mesh->NCellsSize}, + "VertMix-ShearOnly", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -209,7 +209,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else if (LocComputeVertMixConv.Enabled) { parallelForOuter( - "VertMix-ConvOnly", {Mesh->NCellsSize}, + "VertMix-ConvOnly", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell, const TeamMember &Team) { const int KMin = MinLayerCell(ICell); const int KMax = MaxLayerCell(ICell); @@ -223,7 +223,7 @@ void VertMix::computeVertMix(const Array2DReal &NormalVelocity, }); } else { parallelFor( - "VertMix-Background", {Mesh->NCellsSize}, KOKKOS_LAMBDA(I4 ICell) { + "VertMix-Background", {Mesh->NCellsAll}, KOKKOS_LAMBDA(I4 ICell) { LocVertDiff(ICell, 0) = 0.0_Real; LocVertVisc(ICell, 0) = 0.0_Real; }); diff --git a/components/omega/test/ocn/EosTest.cpp b/components/omega/test/ocn/EosTest.cpp index 29cd18bfb6ea..9ca0ff956407 100644 --- a/components/omega/test/ocn/EosTest.cpp +++ b/components/omega/test/ocn/EosTest.cpp @@ -132,7 +132,7 @@ void testEosLinear() { int NumMismatches = 0; Array2DReal SpecVol = TestEos->SpecVol; parallelReduceOuter( - "CheckSpecVolMatrix-linear", {Mesh->NCellsSize}, + "CheckSpecVolMatrix-linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -156,7 +156,7 @@ void testEosLinear() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolH = createHostMirrorCopy(TestEos->SpecVol); - for (int I = 0; I < NCellsSize; ++I) { + for (int I = 0; I < Mesh->NCellsAll; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Linear Bad Value: " @@ -202,7 +202,7 @@ void testEosLinearDisplaced() { int NumMismatches = 0; Array2DReal SpecVolDisplaced = TestEos->SpecVolDisplaced; parallelReduceOuter( - "CheckSpecVolDispMatrix-linear", {Mesh->NCellsSize}, + "CheckSpecVolDispMatrix-linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -227,7 +227,7 @@ void testEosLinearDisplaced() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolDisplacedH = createHostMirrorCopy(SpecVolDisplaced); - for (int I = 0; I < NCellsSize; ++I) { + for (int I = 0; I < Mesh->NCellsAll; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolDisplacedH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Linear Displaced Bad Value: " @@ -265,7 +265,7 @@ void testBruntVaisalaFreqSqLinear() { // for K = 1. OMEGA_SCOPE(ZMid, VCoord->ZMid); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { if (K == 0) { ZMid(ICell, 0) = -992.1173890198451_Real; @@ -304,7 +304,7 @@ void testBruntVaisalaFreqSqLinear() { int NumMismatches = 0; OMEGA_SCOPE(BruntVaisalaFreqSq, TestEos->BruntVaisalaFreqSq); parallelReduceOuter( - "CheckBruntVaisalaSq-Linear", {Mesh->NCellsSize}, + "CheckBruntVaisalaSq-Linear", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -338,7 +338,7 @@ void testBruntVaisalaFreqSqLinear() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto BruntVaisalaFreqSqH = createHostMirrorCopy(BruntVaisalaFreqSq); - for (int I = 0; I < NCellsSize; ++I) { + for (int I = 0; I < Mesh->NCellsAll; ++I) { // top layer should be zero if (BruntVaisalaFreqSqH(I, 0) != 0.0) LOG_ERROR("EosTest: Brunt-Vaisala Linear Bad Value: " @@ -397,7 +397,7 @@ void testEosTeos10() { int NumMismatches = 0; Array2DReal SpecVol = TestEos->SpecVol; parallelReduceOuter( - "CheckSpecVolMatrix-Teos", {Mesh->NCellsSize}, + "CheckSpecVolMatrix-Teos", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -421,7 +421,7 @@ void testEosTeos10() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolH = createHostMirrorCopy(SpecVol); - for (int I = 0; I < NCellsSize; ++I) { + for (int I = 0; I < Mesh->NCellsAll; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol TEOS Bad Value: " @@ -467,7 +467,7 @@ void testEosTeos10Displaced() { int NumMismatches = 0; Array2DReal SpecVolDisplaced = TestEos->SpecVolDisplaced; parallelReduceOuter( - "CheckSpecVolDispMatrix-Teos", {Mesh->NCellsSize}, + "CheckSpecVolDispMatrix-Teos", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -492,7 +492,7 @@ void testEosTeos10Displaced() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto SpecVolDisplacedH = createHostMirrorCopy(SpecVolDisplaced); - for (int I = 0; I < NCellsSize; ++I) { + for (int I = 0; I < Mesh->NCellsAll; ++I) { for (int K = 0; K < NVertLayers; ++K) { if (!isApprox(SpecVolDisplacedH(I, K), LinearExpValue, RTol)) LOG_ERROR("EosTest: SpecVol Displaced TEOS Bad Value: " @@ -529,7 +529,7 @@ void testBruntVaisalaFreqSqTeos10() { /// Fill inputs with values that should lead to ref result for K=1 OMEGA_SCOPE(ZMid, VCoord->ZMid); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { if (K == 0) { ZMid(ICell, 0) = -992.1173890198451_Real; @@ -568,7 +568,7 @@ void testBruntVaisalaFreqSqTeos10() { int NumMismatches = 0; OMEGA_SCOPE(BruntVaisalaFreqSq, TestEos->BruntVaisalaFreqSq); parallelReduceOuter( - "CheckSpecVolMatrix-Teos", {Mesh->NCellsSize}, + "CheckSpecVolMatrix-Teos", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -602,7 +602,7 @@ void testBruntVaisalaFreqSqTeos10() { // If test fails, print bad values and abort if (NumMismatches != 0) { auto BruntVaisalaFreqSqH = createHostMirrorCopy(BruntVaisalaFreqSq); - for (int ICell = 0; ICell < NCellsSize; ++ICell) { + for (int ICell = 0; ICell < Mesh->NCellsAll; ++ICell) { // top layer should be zero if (BruntVaisalaFreqSqH(ICell, 0) != 0.0) LOG_ERROR("EosTest: Brunt-Vaisala TEOS Bad Value: " diff --git a/components/omega/test/ocn/VertMixTest.cpp b/components/omega/test/ocn/VertMixTest.cpp index bf3df79f0189..96d1195e039f 100644 --- a/components/omega/test/ocn/VertMixTest.cpp +++ b/components/omega/test/ocn/VertMixTest.cpp @@ -125,7 +125,7 @@ void testBackVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; }); parallelFor( @@ -152,7 +152,7 @@ void testBackVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-BackgroundVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-BackgroundVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -187,7 +187,7 @@ void testBackVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-BackgroundDiff", {Mesh->NCellsSize}, + "CheckVertMixMatrix-BackgroundDiff", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -251,7 +251,7 @@ void testConvVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; }); parallelFor( @@ -278,7 +278,7 @@ void testConvVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ConvectiveVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-ConvectiveVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -315,7 +315,7 @@ void testConvVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ConvectiveDiff", {Mesh->NCellsSize}, + "CheckVertMixMatrix-ConvectiveDiff", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -382,7 +382,7 @@ void testShearVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; NEdgesOnCell(ICell) = 5; @@ -415,7 +415,7 @@ void testShearVertMix() { /// Check total Visc against linear addition of components int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -458,7 +458,7 @@ void testShearVertMix() { /// Check total Diff against linear addition of components NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-ShearVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -534,7 +534,7 @@ void testTotalVertMix() { deepCopy(TestVertMix->VertVisc, 0.0); parallelFor( - "populateArrays", {NCellsSize, NVertLayers}, + "populateArrays", {Mesh->NCellsAll, NVertLayers}, KOKKOS_LAMBDA(I4 ICell, I4 K) { ZMid(ICell, K) = -K; NEdgesOnCell(ICell) = 5; @@ -567,7 +567,7 @@ void testTotalVertMix() { /// Check all VertDiff array values against expected value int NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalPosDiff", {Mesh->NCellsSize}, + "CheckVertMixMatrix-TotalPosDiff", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -609,7 +609,7 @@ void testTotalVertMix() { /// Check all VertVisc array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalPosVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-TotalPosVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -662,7 +662,7 @@ void testTotalVertMix() { /// Check all VertDiff array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalNegDiff", {Mesh->NCellsSize}, + "CheckVertMixMatrix-TotalNegDiff", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell); @@ -704,7 +704,7 @@ void testTotalVertMix() { /// Check all VertVisc array values against expected value NumMismatches = 0; parallelReduceOuter( - "CheckVertMixMatrix-TotalNegVisc", {Mesh->NCellsSize}, + "CheckVertMixMatrix-TotalNegVisc", {Mesh->NCellsAll}, KOKKOS_LAMBDA(int ICell, const TeamMember &Team, int &OuterCount) { int NumMismatchesCol; const int KMin = MinLayerCell(ICell);