Closed CThuleHansen closed 2 years ago
As a workaround, to get it working when we are running with one thread, what you suggested @CThuleHansen works. In the DSE scripts I commented (locally): https://github.com/INTO-CPS-Association/dse_scripts/blob/35f9caeff3cd409589067b03da40ac6aa4cd7d28/scripts/COE_handler.py#L78, then it works.
I encounter the following error with the JVM commands used for spawning the process: "Improperly specified VM option 'TieredStopAtLevel=1 '". I can see that this argument gets included from iterating "ManagementFactory.getRuntimeMXBean().getInputArguments()". If I do not include the specific option, other JVM commands also fails to be applied resulting in the JVM not being created. Do you have any ideas about this @CThuleHansen @lausdahl?
The error I encountered was due to running Maestro in Intellij. I have pushed a possible fix to fpm/362, however I am not sure how to test it.
Leave the rest…. This is a rabbit Hole. For my sake 2. is fine.
Some things are just difficult to test directly 🙂
DSE is capable of running multiple simulations in parallel. The maestro2 web api is not thread safe and for this reason, a special method was implemented in the web api: executeViaCLI https://github.com/INTO-CPS-Association/maestro/blob/development/maestro-webapi/src/main/java/org/intocps/maestro/webapi/maestro2/Maestro2SimulationController.java#L311-L314
When this method is called between the requests create session and simulate, it will cause the simulate to spawn a new java process and launch the simulation via the CLI.
However, there is not automated testing for this. Therefore, after the Maestro2 CLI has been updated, this feature is broken. It has to be fixed here: https://github.com/INTO-CPS-Association/maestro/blob/development/maestro-webapi/src/main/java/org/intocps/maestro/webapi/maestro2/Maestro2SimulationController.java#L207-L250