Hi everyone, I am having an issue running OpenTPS proton plan optimization from a Python/Jupyter workflow on Linux.
Setup:
-
Linux workstation
-
Python 3.12
-
OpenTPS 3.0.1
-
VS Code + Jupyter
The crash occurs when calling:
dose_calculator.computeBeamlets(...)
I added debug messages and narrowed it down to:
MCsquareDoseCalculator.computeBeamlets()
→ _computeBeamletsLinux()
→ MCsquareSharedLib.computeBeamletsSharedLib()
→ computeBeamletsSparseMat()
The last output before the Jupyter kernel dies is:
You are running MCsquare from shared library
Warning: Unknown tag "Optimization_Mode" in config.txt
The native call:
self._libsparseMat.computeBeamletsSparseMat(...)
never returns to Python, so the crash seems to happen inside libMCsquare.so.
Interestingly, beamlet calculation through the OpenTPS GUI on the same Linux system can proceed further, while the Jupyter kernel crashes at this native call.
Has anyone encountered this issue when using computeBeamlets() from Jupyter/Python on Linux? Is there any known difference between how the GUI and a standalone Python workflow initialize or call the MCsquare shared library?