Skip to content

Commit

Permalink
This should be fixed... but I get a segfault on GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Nov 7, 2024
1 parent 8c6f4d0 commit 42a9356
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ KOKKOS_INLINE_FUNCTION int upper_bound(const T &arr, Real val) {
template <class Key, class KeyComparator>
void sort(ParArray1D<Key> data, KeyComparator comparator, size_t min_idx,
size_t max_idx) {
Kokkos::fence();
printf("%s:%i\n", __FILE__, __LINE__);
PARTHENON_DEBUG_REQUIRE(min_idx < data.extent(0), "Invalid minimum sort index!");
PARTHENON_DEBUG_REQUIRE(max_idx < data.extent(0), "Invalid maximum sort index!");
#if defined(KOKKOS_ENABLE_CUDA)
Expand Down Expand Up @@ -90,6 +92,8 @@ void sort(ParArray1D<Key> data, KeyComparator comparator, size_t min_idx,
"touch by opening an issue on the Parthenon GitHub.");
}
#endif // KOKKOS_ENABLE_CUDA
Kokkos::fence();
printf("%s:%i\n", __FILE__, __LINE__);
}

template <class Key>
Expand Down

0 comments on commit 42a9356

Please sign in to comment.