Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kokkos::abort directly #14772

Merged
merged 1 commit into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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