cmssw: allocating a host buffer in a dev.cc file causes a crash at the end of the job

Calling cms::alpakatools::make_host_buffer<T>(queue) in a .dev.cc file compiled for the CUDA back-end causes a crash at the end of the job:

Fatal system signal has occurred during exit
Aborted (core dumped)

A simple reproducer is

diff --git a/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlgo.dev.cc b/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlgo.dev.cc
index 6bdb36e0e57a..03d4d0eeb1bb 100644
--- a/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlgo.dev.cc
+++ b/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlgo.dev.cc
@@ -52,6 +52,12 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
     auto workDiv = make_workdiv<Acc1D>(groups, items);
 
     alpaka::exec<Acc1D>(queue, workDiv, TestAlgoKernel{}, collection.view(), collection->metadata().size(), xvalue);
+
+    // unused
+    std::cerr << "############################################################################\n";
+    auto buffer = cms::alpakatools::make_host_buffer<int>(queue);
+    std::cerr << "unused buffer at " << buffer.data() << '\n';
+    std::cerr << "############################################################################\n";
   }
 
 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE
scram b
cmsRun HeterogeneousCore/AlpakaTest/test/writer.py

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

@ywkao @borzari FYI

I finally managed to come up with a minimal reproducer of a problem you independently reported in the past weeks.

@cmsbuild, please close

+heterogeneous

This issue was fixed by the PRs linking this issue listed above.

assign heterogeneous