Skip to content

Commit

Permalink
Merge pull request #14772 from masterleinad/fix_kokkos_abort_rdc
Browse files Browse the repository at this point in the history
Use Kokkos::abort directly
  • Loading branch information
kronbichler committed Feb 25, 2023
2 parents b11b0bc + 1e834eb commit 68d4128
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
14 changes: 7 additions & 7 deletions include/deal.II/base/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <deal.II/base/config.h>

#include <deal.II/base/kokkos.h>
#include <Kokkos_Core.hpp>

#include <exception>
#include <ostream>
Expand Down Expand Up @@ -1524,7 +1524,7 @@ namespace deal_II_exceptions
})) \
KOKKOS_IF_ON_DEVICE(({ \
if (!(cond)) \
dealii::internal::kokkos_abort(#cond); \
Kokkos::abort(#cond); \
})) \
}
# else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
Expand All @@ -1544,7 +1544,7 @@ namespace deal_II_exceptions
})) \
KOKKOS_IF_ON_DEVICE(({ \
if (!(cond)) \
dealii::internal::kokkos_abort(#cond); \
Kokkos::abort(#cond); \
})) \
}
# endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
Expand Down Expand Up @@ -1580,10 +1580,10 @@ namespace deal_II_exceptions
}
# endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
# else /*#ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
# define Assert(cond, exc) \
{ \
if (!(cond)) \
dealii::internal::kokkos_abort(#cond); \
# define Assert(cond, exc) \
{ \
if (!(cond)) \
Kokkos::abort(#cond); \
}
# endif /*ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
# endif /*KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
Expand Down
7 changes: 0 additions & 7 deletions include/deal.II/base/kokkos.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ namespace internal
void
ensure_kokkos_initialized();

/**
* Calls Kokkos::abort. This wrapper avoids including Kokkos_Core.hpp, which
* provides all of Kokkos' functionalities, on the call side.
*/
KOKKOS_FUNCTION void
kokkos_abort(const char *error);

} // namespace internal

DEAL_II_NAMESPACE_CLOSE
Expand Down
4 changes: 2 additions & 2 deletions include/deal.II/base/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ namespace internal
KOKKOS_IF_ON_DEVICE(({
(void)val;
(void)s;
dealii::internal::kokkos_abort(
Kokkos::abort(
"This function is not implemented for std::complex<Number>!\n");
}))
# else
Expand All @@ -1175,7 +1175,7 @@ namespace internal
# else
(void)val;
(void)s;
dealii::internal::kokkos_abort(
Kokkos::abort(
"This function is not implemented for std::complex<Number>!\n");
# endif
# endif
Expand Down
6 changes: 0 additions & 6 deletions source/base/kokkos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,5 @@ namespace internal
(void)dummy;
}
}

KOKKOS_FUNCTION void
kokkos_abort(const char *error)
{
Kokkos::abort(error);
}
} // namespace internal
DEAL_II_NAMESPACE_CLOSE

0 comments on commit 68d4128

Please sign in to comment.