Skip to content

Commit

Permalink
Replace KOKKOS_IMPL_DO_NOT_USE_PRINTF by ifndef KOKKOS_ENABLE_SYCL gu…
Browse files Browse the repository at this point in the history
…ards
  • Loading branch information
masterleinad committed May 4, 2021
1 parent 68f57e3 commit 45fefc7
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,22 +284,28 @@ struct UnpackCrsMatrixAndCombineFunctor {

if (expected_num_bytes > num_bytes)
{
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
// FIXME_SYCL Enable again once a SYCL conforming printf implementation is available.
#ifndef KOKKOS_ENABLE_SYCL
printf(
"*** Error: UnpackCrsMatrixAndCombineFunctor: "
"At row %d, the expected number of bytes (%d) != number of unpacked bytes (%d)\n",
(int) lid_no, (int) expected_num_bytes, (int) num_bytes
);
#endif
Kokkos::atomic_compare_exchange_strong(error_code.data(), 0, 21);
return;
}

if (offset > buf_size || offset + num_bytes > buf_size)
{
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
// FIXME_SYCL Enable again once a SYCL conforming printf implementation is available.
#ifndef KOKKOS_ENABLE_SYCL
printf(
"*** Error: UnpackCrsMatrixAndCombineFunctor: "
"At row %d, the offset (%d) > buffer size (%d)\n",
(int) lid_no, (int) offset, (int) buf_size
);
#endif
Kokkos::atomic_compare_exchange_strong(error_code.data(), 0, 22);
return;
}
Expand Down Expand Up @@ -332,11 +338,14 @@ struct UnpackCrsMatrixAndCombineFunctor {
(void)PackTraits<LO>::unpackValue(num_ent_out, num_ent_in);
if (static_cast<size_t>(num_ent_out) != num_entries_in_row)
{
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
// FIXME_SYCL Enable again once a SYCL conforming printf implementation is available.
#ifndef KOKKOS_ENABLE_SYCL
printf(
"*** Error: UnpackCrsMatrixAndCombineFunctor: "
"At row %d, number of entries (%d) != number of entries unpacked (%d)\n",
(int) lid_no, (int) num_entries_in_row, (int) num_ent_out
);
#endif
Kokkos::atomic_compare_exchange_strong(error_code.data(), 0, 23);
}

Expand Down Expand Up @@ -389,10 +398,13 @@ struct UnpackCrsMatrixAndCombineFunctor {
);
} else {
// should never get here
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
// FIXME_SYCL Enable again once a SYCL conforming printf implementation is available.
#ifndef KOKKOS_ENABLE_SYCL
printf(
"*** Error: UnpackCrsMatrixAndCombineFunctor: "
"At row %d, an unknown error occurred during unpack\n", (int) lid_no
);
#endif
Kokkos::atomic_compare_exchange_strong(error_code.data(), 0, 31);
}
}
Expand Down

0 comments on commit 45fefc7

Please sign in to comment.