Skip to content

Commit fcc92dc

Browse files
author
OutlyingWest
committed
VAMPIR_NOT_FOUND message at %%enable_vampir_launch_on_scorep_instrumented execution
1 parent 4248559 commit fcc92dc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/scorep_jupyter/kernel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,10 @@ async def do_execute(
900900

901901
elif code.startswith("%%enable_vampir_launch_on_scorep_instrumented"):
902902
self.launch_vampir_requested = True
903-
self.cell_output("Vampir will be launched after next instrumented execution.")
903+
if shutil.which("vampir") is None:
904+
self.log_error(KernelErrorCode.VAMPIR_NOT_FOUND)
905+
else:
906+
self.cell_output("Vampir will be launched after next instrumented execution.")
904907
return self.standard_reply()
905908
elif code.startswith("%%disable_vampir_launch"):
906909
self.launch_vampir_requested = False

src/scorep_jupyter/kernel_messages.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class KernelErrorCode(Enum):
4545
"(looked in: {scorep_folder})"
4646
),
4747
KernelErrorCode.VAMPIR_NOT_FOUND: (
48-
"Vampir binary not found in PATH. Cannot launch visualization."
48+
"Vampir binary not found in PATH. Add it to PATH to enable automatic launch"
49+
" (e.g. via `%env PATH=/path/to/vampir/bin:$PATH`)."
4950
),
5051

5152
KernelErrorCode.VAMPIR_LAUNCH_FAILED: (

0 commit comments

Comments
 (0)