You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A SimBaseClass will freeze (loop infinitely) when including a simulationArchTypes.PythonProcessClass with priority higher than other C/C++ processes in the sim.
To reproduce
from Basilisk.utilities import SimulationBaseClass
from Basilisk.utilities import macros
def test(freeze):
scSim = SimulationBaseClass.SimBaseClass()
dynProcess = scSim.CreateNewProcess("simProcess", 10)
dynProcess.addTask(scSim.CreateNewTask("sensorTask", macros.sec2nano(10.)))
# Note that having a python priority > C/C++ priority
# causes a freeze, but not the other way around
pyProcess = scSim.CreateNewPythonProcess("python", 11 if freeze else 9)
scSim.InitializeSimulation()
scSim.ConfigureStopTime(macros.sec2nano(30))
scSim.ExecuteSimulation()
print(f"Finished running (Was supposed to freeze? {freeze})")
if __name__ == '__main__':
test(False)
test(True) # You are going to have to kill it
Expected behavior
Either not freezing, or a clear error message when trying to create python processes with higher priority than C++ processes.
Desktop:
OS: Windows 64bit
Version 2.1.7b0 (built with develop when the latest commit was 4f6c57d at February 22nd, 2023 5:17 PM)
Python version: Python 3.11.0
Additional context
I would suggest adding an error message for the time being (as you are not supposed to use python processes with higher priority than C/C++ anyway, and this would make it very clear) until #200 gets implemented.
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out, @juan-g-bonilla. The last time I worked with Python processes, the simulation didn't freeze. Rather, it simply ignored my priority setting and ran the Python process at the end.
Thanks for mentioning issue #200. This might be a higher priority than I had initially considered.
Describe the bug
A
SimBaseClass
will freeze (loop infinitely) when including asimulationArchTypes.PythonProcessClass
with priority higher than other C/C++ processes in the sim.To reproduce
Expected behavior
Either not freezing, or a clear error message when trying to create python processes with higher priority than C++ processes.
Desktop:
develop
when the latest commit was 4f6c57d at February 22nd, 2023 5:17 PM)Additional context
I would suggest adding an error message for the time being (as you are not supposed to use python processes with higher priority than C/C++ anyway, and this would make it very clear) until #200 gets implemented.
The text was updated successfully, but these errors were encountered: