Skip to content

Commit

Permalink
Fixed cp2k#776
Browse files Browse the repository at this point in the history
* Citation: "Setting cudaLimitPrintfFifoSize must not be performed after launching any kernel that uses the printf() device system call - in such case cudaErrorInvalidValue will be returned."
* Since DeviceSetLimit is governed by ACC_API_CALL, the symbol NDEBUG must not be defined for reproducing the issue.
  • Loading branch information
hfp committed Apr 4, 2024
1 parent 6db5b28 commit 51d1433
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/acc/cuda_hip/acc_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ extern "C" int c_dbcsr_acc_set_active_device(int device_id) {
ACC_API_CALL(Free, (0));

#if defined(__CUDA) || defined(__HIP_PLATFORM_NVCC__)
ACC_API_CALL(DeviceSetLimit, (ACC(LimitPrintfFifoSize), (size_t)1000000000));
static bool once = false;
if (!once) {
ACC_API_CALL(DeviceSetLimit, (ACC(LimitPrintfFifoSize), (size_t)1000000000));
once = true;
}
#endif

return 0;
Expand Down

0 comments on commit 51d1433

Please sign in to comment.