Skip to content

Commit

Permalink
Fixed ordering of fixup_halos and halo_exhange in StructuredColumns.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
odlomax committed Sep 24, 2024
1 parent 59efc06 commit 5784ea2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/atlas/functionspace/detail/StructuredColumns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,20 +830,20 @@ void dispatch_adjointHaloExchange(Field& field, const parallel::HaloExchange& ha
const StructuredColumns& fs) {
FixupHaloForVectors<RANK> fixup_halos(fs);
if (field.datatype() == array::DataType::kind<int>()) {
halo_exchange.template execute_adjoint<int, RANK>(field.array(), false);
fixup_halos.template apply<int>(field);
halo_exchange.template execute_adjoint<int, RANK>(field.array(), false);
}
else if (field.datatype() == array::DataType::kind<long>()) {
halo_exchange.template execute_adjoint<long, RANK>(field.array(), false);
fixup_halos.template apply<long>(field);
halo_exchange.template execute_adjoint<long, RANK>(field.array(), false);
}
else if (field.datatype() == array::DataType::kind<float>()) {
halo_exchange.template execute_adjoint<float, RANK>(field.array(), false);
fixup_halos.template apply<float>(field);
halo_exchange.template execute_adjoint<float, RANK>(field.array(), false);
}
else if (field.datatype() == array::DataType::kind<double>()) {
halo_exchange.template execute_adjoint<double, RANK>(field.array(), false);
fixup_halos.template apply<double>(field);
halo_exchange.template execute_adjoint<double, RANK>(field.array(), false);
}
else {
throw_Exception("datatype not supported", Here());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ void testInterpolation(const Config& config) {
auto sourceAdjointView = array::make_view<double, Rank>(sourceAdjoint);
sourceAdjointView.assign(0.);

sourceAdjoint.set_dirty(false);
interp.execute_adjoint(sourceAdjoint, targetAdjoint);

// Check fields for nans or +/-inf
Expand Down

0 comments on commit 5784ea2

Please sign in to comment.