Skip to content

Commit

Permalink
fix: getSpan tests segfault on GPU span access GPU memory from CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
HenningScheufler committed Oct 6, 2024
1 parent fc4c38b commit 929d37e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/fields/field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,12 @@ TEST_CASE("getSpans")
NeoFOAM::Executor(NeoFOAM::GPUExecutor {})
);


NeoFOAM::Field<NeoFOAM::scalar> a(exec, 3, 1.0);
NeoFOAM::Field<NeoFOAM::scalar> b(exec, 3, 2.0);
NeoFOAM::Field<NeoFOAM::scalar> c(exec, 3, 3.0);

auto [spanA, spanB, spanC] = NeoFOAM::spans(a, b, c);

REQUIRE(spanA[0] == 1.0);
REQUIRE(spanB[0] == 2.0);
REQUIRE(spanC[0] == 3.0);

NeoFOAM::parallelFor(
a, KOKKOS_LAMBDA(const NeoFOAM::size_t i) { return spanB[i] + spanC[i]; }
);
Expand Down

0 comments on commit 929d37e

Please sign in to comment.