Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Spatiotemporal Epidemiological Modeler (STEM) » STEM headless mode doesn't work well.
STEM headless mode doesn't work well. [message #1826148] Mon, 20 April 2020 08:44 Go to next message
Brad Lee is currently offline Brad LeeFriend
Messages: 3
Registered: April 2020
Junior Member
Hi, I wrote a scenario about Corona virus erupted in South Korea through STEM.

Running my scenario GUI works well.

But if I use STEM Headless mode to run the scenario, it just does not work even i used totally same scenario with same Loggers.

Additionally, I read an article about previous issue (https://www.eclipse.org/forums/index.php/t/208356/) but, it seems little bit outdated so I found it is not really helpful.

I'm running STEM on Windows 10.
When i run headless, STEM Process is running but nothing happens. (see below).

index.php/fa/37902/0/
index.php/fa/37903/0/

Please check this issue.

==================================================================
2020-04-21 Added

I've just tried it on Ubuntu.
While the example scenario on Wiki (UsaMexico) runs just fine on Headless STEM, my scenario doesn't. (Even it works well in GUI mode.)

It raises NullPointerException when '-log' option added, otherwise it raises UnsupportedOperationException.

move02@DESKTOP-9L3L9IC:~/stem$ ./STEM -headless -log -project CoronaVirus -scenario KorCoronaVirusScenario.scenario
Scenarios selected: [platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario]
Creating simulation for platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario
Warning: NLS missing message: INFECTOR_NODE_NOT_FOUND in: org.eclipse.stem.diseasemodels.standard.impl.messages
Error creating simulation for URI platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario
java.lang.NullPointerException
        at org.eclipse.stem.ui.headless.HeadlessSimulationRunner.addLogger(HeadlessSimulationRunner.java:144)
        at org.eclipse.stem.ui.headless.HeadlessSimulationRunner.runScenarios(HeadlessSimulationRunner.java:188)
        at org.eclipse.stem.ui.headless.HeadlessSimulationRunner.run(HeadlessSimulationRunner.java:95)
        at org.eclipse.stem.ui.headless.HeadlessLauncher.launch(HeadlessLauncher.java:109)
        at org.eclipse.stem.core.common.presentation.CoreEditorAdvisor$Application.start(CoreEditorAdvisor.java:372)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1471)


and

move02@DESKTOP-9L3L9IC:~/stem$ ./STEM -headless -project CoronaVirus -scenario KorCoronaVirusScenario.scenario
Scenarios selected: [platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario]
Creating simulation for platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario
Error creating simulation for URI platform:/resource/CoronaVirus/scenarios/KorCoronaVirusScenario.scenario
java.lang.UnsupportedOperationException
        at org.eclipse.stem.core.model.impl.DecoratorImpl.decorateGraph(DecoratorImpl.java:277)
        at org.eclipse.stem.core.model.impl.ModelImpl.invokeNodeDecorators(ModelImpl.java:484)
        at org.eclipse.stem.core.model.impl.ModelImpl.getCanonicalGraph(ModelImpl.java:235)
        at org.eclipse.stem.core.scenario.impl.ScenarioImpl.initialize(ScenarioImpl.java:561)
        at org.eclipse.stem.jobs.simulation.SimulationManager.createSimulation(SimulationManager.java:328)
        at org.eclipse.stem.ui.headless.HeadlessSimulationRunner.runScenarios(HeadlessSimulationRunner.java:185)
        at org.eclipse.stem.ui.headless.HeadlessSimulationRunner.run(HeadlessSimulationRunner.java:95)
        at org.eclipse.stem.ui.headless.HeadlessLauncher.launch(HeadlessLauncher.java:109)
        at org.eclipse.stem.core.common.presentation.CoreEditorAdvisor$Application.start(CoreEditorAdvisor.java:372)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1471)


And here is eclipse logs in .metadata directory when Error raised

eclipse.buildId=unknown
java.version=1.8.0_251
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en
Framework arguments:  -headless -project CoronaVirus -scenario KorCoronaVirusScenario.scenario
Command-line arguments:  -os linux -ws gtk -arch x86_64 -headless -project CoronaVirus -scenario KorCoronaVirusScenario.scenario

!ENTRY org.eclipse.stem.core 4 0 2020-04-22 10:54:41.631
!MESSAGE decorateGraph() not implemented in "null" of type "org.eclipse.stem.core.model.impl.NodeDecoratorImpl"


===============================================================================================

2020-04-22 Added
I also ran some disease models provided by STEM with Headless mode, and here is the results.

1. SEIR Compartment Model

  • GUI : works
  • Headless : works


2. Seasonal Models(Plain, Gaussian, Alt.Gaussian)

  • GUI : works
  • Headless : works


3. Evolving SEIR Model

  • GUI : works
  • Headless : works


4. N Co V

  • GUI : works
  • Headless : Error


5. Custom Model(based on SEIR model)

  • GUI : works
  • Headless : Error


Although, I didn't try all disease models provided by STEM, I think simulation with custom disease models raises those errors because N Co V is a kind of custom model based on SIR model.

Please check this issue.

Thank you for reading this.
I look forward to hearing from you.

Thank you.

[Updated on: Wed, 22 April 2020 04:09]

Report message to a moderator

Re: STEM headless mode doesn't work well. [message #1828500 is a reply to message #1826148] Thu, 11 June 2020 04:41 Go to previous messageGo to next message
James Kaufman is currently offline James KaufmanFriend
Messages: 240
Registered: July 2009
Senior Member
Please see this new doc
https://wiki.eclipse.org/Server_Side_Logger_Workaround
For generated models you want to add that line of code and then the regular stem loggers will work. There is an issue with the older server side log option so with this workaround you don't need to add -log.
Also please post your Java and OS versions. We are investigating a possible issue with OpenJDK. be sure to use Java 8
Re: STEM headless mode doesn't work well. [message #1828545 is a reply to message #1828500] Thu, 11 June 2020 17:24 Go to previous message
James Kaufman is currently offline James KaufmanFriend
Messages: 240
Registered: July 2009
Senior Member
Please see; https://bugs.eclipse.org/bugs/show_bug.cgi?id=564213
There is a temporary work around for a race condition with the-loadWorkspacePlugins option
Previous Topic:Three Sars-CoV2 models are now available
Next Topic:Recent Bugs, bug fixes, and work arounds
Goto Forum:
  


Current Time: Fri Nov 08 22:22:17 GMT 2024

Powered by FUDForum. Page generated in 0.03096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top