Skip to content

Commit

Permalink
Allow printing errors in normalize_species on GPUs (#2944)
Browse files Browse the repository at this point in the history
This was helpful for debugging my failing flame_wave run on Frontier.
  • Loading branch information
yut23 committed Aug 19, 2024
1 parent 15327db commit 677b8ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3125,6 +3125,9 @@ Castro::normalize_species (MultiFab& S_new, int ng)
X > 1.0_rt + castro::abundance_failure_tolerance) {
#ifndef AMREX_USE_GPU
std::cout << "(i, j, k) = " << i << " " << j << " " << k << " " << ", X[" << n << "] = " << X << " (density here is: " << u(i,j,k,URHO) << ")" << std::endl;
#elif defined(ALLOW_GPU_PRINTF)
AMREX_DEVICE_PRINTF("(i, j, k) = %d %d %d, X[%d] = %g (density here is: %g)\n",
i, j, k, n, X, u(i,j,k,URHO));
#endif
}
}
Expand Down

0 comments on commit 677b8ea

Please sign in to comment.