Skip to content

Commit

Permalink
Merge pull request #186 from brian-oneill/boneill/omega/state-test-fix
Browse files Browse the repository at this point in the history
Fix State unit test failure
  • Loading branch information
philipwjones authored Dec 10, 2024
2 parents 18de8ef + e5c13e1 commit 97f45f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/omega/src/ocn/OceanInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,20 @@ int initOmegaModules(MPI_Comm Comm) {
}
}

// Update Halos and Device arrays with new state and tracer fields
// Update Halos and Host arrays with new state and tracer fields

OceanState *DefState = OceanState::getDefault();
I4 CurTimeLevel = 0;
DefState->exchangeHalo(CurTimeLevel);
DefState->copyToDevice(CurTimeLevel);
DefState->copyToHost(CurTimeLevel);

// Now update tracers - assume using same time level index
Err = Tracers::exchangeHalo(CurTimeLevel);
if (Err != 0) {
LOG_CRITICAL("Error updating tracer halo after restart");
return Err;
}
Err = Tracers::copyToDevice(CurTimeLevel);
Err = Tracers::copyToHost(CurTimeLevel);
if (Err != 0) {
LOG_CRITICAL("Error updating tracer device arrays after restart");
return Err;
Expand Down
4 changes: 2 additions & 2 deletions components/omega/test/ocn/StateTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ int initStateTest() {
}

// Finish initialization of initial state by filling halos and copying
// to device. Current time level is zero.
// to host. Current time level is zero.
OceanState *DefState = OceanState::getDefault();
DefState->exchangeHalo(0);
DefState->copyToDevice(0);
DefState->copyToHost(0);

return Err;
}
Expand Down

0 comments on commit 97f45f8

Please sign in to comment.