Skip to content

Commit

Permalink
Merge pull request #45630 from mmusich/mm_dev_44923
Browse files Browse the repository at this point in the history
instrument `fitVertices` to output more information when failing assert (issue #44923)
  • Loading branch information
cmsbuild authored Aug 5, 2024
2 parents 64834b5 + 2055459 commit 6a0edc7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion RecoTracker/PixelVertexFinding/plugins/alpaka/fitVertices.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder {
alpaka::syncBlockThreads(acc);
// reuse nn
for (auto i : cms::alpakatools::uniform_elements(acc, foundClusters)) {
ALPAKA_ASSERT_ACC(wv[i] > 0.f);
bool const wv_cond = (wv[i] > 0.f);
if (not wv_cond) {
printf("ERROR: wv[%d] (%f) > 0.f failed\n", i, wv[i]);
// printing info on tracks associated to this vertex
for (auto trk_i = 0u; trk_i < nt; ++trk_i) {
if (iv[trk_i] != int(i)) {
continue;
}
printf(" iv[%d]=%d zt[%d]=%f ezt2[%d]=%f\n", trk_i, iv[trk_i], trk_i, zt[trk_i], trk_i, ezt2[trk_i]);
}
ALPAKA_ASSERT_ACC(false);
}

zv[i] /= wv[i];
nn[i] = -1; // ndof
}
Expand Down

0 comments on commit 6a0edc7

Please sign in to comment.