Skip to content

Commit 5469807

Browse files
committed
Raise an exception with a clear error message if alpaka PSet is tracked
1 parent 2639e87 commit 5469807

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

HeterogeneousCore/AlpakaCore/python/ProcessAcceleratorAlpaka.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def setModuleVariant(self, module):
3232
if module.type_().endswith("@alpaka"):
3333
defaultBackend = self._valid_backends[0]
3434
if hasattr(module, "alpaka"):
35+
# Ensure the untrackedness already here, because the
36+
# C++ ModuleTypeResolverAlpaka relies on the
37+
# untrackedness (before the configuration validation)
38+
if module.alpaka.isTracked():
39+
raise cms.EDMException(cms.edm.errors.Configuration, "The 'alpaka' PSet in module '{}' is tracked, but it should be untracked".format(module.label()))
3540
if hasattr(module.alpaka, "backend"):
3641
if module.alpaka.backend == "":
3742
module.alpaka.backend = defaultBackend

0 commit comments

Comments
 (0)