Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Spatiotemporal Epidemiological Modeler (STEM) » headless not logging!?
headless not logging!? [message #667489] Fri, 29 April 2011 06:06 Go to next message
No real name is currently offline No real name
Messages: 3
Registered: April 2011
Junior Member
Hi,

I'm having big issues logging data while running scenario's in headless. I'm currently using v1.2 RC5 64bit for OS X, but have also tried RC5 plus the slightly older weekly builds on a linux machine.

I can launch STEM -headless fine and scenarios execute like expected. However, even though I provide the -log parameter, the .csv files are generated but they never get populated with any data. I've tried several projects, including one that was created following exact instructions on the STEM wiki.

(also to note: I've validated all project-files inside the GUI so they should be error-free)

There are several weird parts to this issue. First of all, all scenarios I attempt to run headless-ly runs fine in the GUI, and if I turn .csv logger on while simulation in the GUI it also logs correctly to the .csv-files. There seems to be an issue with logging in -headless !?!

The other weird part of this problem is that I've downloaded the UsaMexico project and run it in -headless mode. It actually *does* log output BUT it only starts doing so at exactly 40% (why is that?). Basically it writes out a huge 10.5MB chunk of data at 40% and then another 10MB or so in the final %.


I need to get headless up and running ASAP with the logging. Any pointers?

Thanks
Re: headless not logging!? [message #667592 is a reply to message #667489] Fri, 29 April 2011 18:47 Go to previous messageGo to next message
Matthew Davis
Messages: 269
Registered: July 2009
Senior Member
We use a very large write buffer for the STEM loggers - 10MB - and don't flush frequently, which is why you only see data written in large (~10 MB) batches. I think the problem is the headless mode does not completely "stop" a simulation at the end, which means the loggers may not completely flush.

I've opened a bug for this problem here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=344336

Thanks for the report!
Re: headless not logging!? [message #667608 is a reply to message #667592] Fri, 29 April 2011 21:42 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 3
Registered: April 2011
Junior Member
Thanks for looking into this!

I read your comments to the bug report and have a couple of questions. After the bug fixes, what is the current behavior of logging in headless?

Also, is it possible to trigger a PAUSE while running headless to ensure the buffer is being flushed to the log?

I know the RC5 was released just yesterday. Have you guys planned a date for the next build?

If it still only flushes at 10MB, I might give it a try to rebuild STEM where the buffer size is much lower.


Thanks.
Re: headless not logging!? [message #667614 is a reply to message #667489] Fri, 29 April 2011 22:35 Go to previous messageGo to next message
Matthew Davis
Messages: 269
Registered: July 2009
Senior Member
Hi,

The commits earlier today fix the two bugs listed in the bug report. First, when running a simulation in headless mode, a STOP event will be fired at completion, which will properly flush and close the log files. Second fix is to match a bug fix from the UI logger earlier this month, that'll flush the log at PAUSE too. Together these should ensure no log data is lost on simulations that run to completion in headless (including log files < 10 MB). This will be in the 1.2.0 release build, which should happen this weekend or early next week.

This does not fix the issue where a headless process is killed by signal and data does not get flushed. The same problem also exists in the UI loggers, but at least you can stop/pause in UI. For the next release, we'll investigate options here. One option could be to make the write buffer size configurable and/or allow interactive input from the console (like "stop" or "exit").

-Matt
Re: headless not logging!? [message #667626 is a reply to message #667614] Sat, 30 April 2011 05:55 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 3
Registered: April 2011
Junior Member
Say for instance I would like to change the buffer size to a much lower value in NewCVSLogWriter.java; is there any way to recompile only "org.eclipse.stem.util.loggers" and get the jar file so i could replace the one that I currently have in my plugins/ directory?

I see there is a build.properties file but I'm not sure how to go about compiling it. I assume I would somehow need to generate a build.xml for ant? Any pointers would be great
Re: headless not logging!? [message #667899 is a reply to message #667626] Mon, 02 May 2011 16:27 Go to previous messageGo to next message
Matthew Davis
Messages: 269
Registered: July 2009
Senior Member
Hi again,

Yep, it should be pretty easy.

Assuming you're using Eclipse with the plug-in development environment installed (Eclipse Classic or Plug-in Developer versions) and have checked out the STEM source code, do the following...

- Right click on the org.eclipse.stem.util.loggers project
- Select Export
- In the Export wizard, expand "Plug-in Development", select "Deployable plug-ins and fragments" and click next
- Make sure "org.eclipse.stem.util.loggers" is selected. Enter a directory to export to.
- Click Finish

This will compile and create properly-formed plug-in JAR in the "plugins" directory under your target directory.

- Next, copy the JAR file to the "plugins" directory under the root directory of your STEM installation. Make sure the name matches and the new JAR replaces the existing org.eclipse.stem.util.loggers_* JAR file in this directory.
- Launch STEM through the command line with the -clean flag. (If you're using a Mac, it'll be: "STEM.app/Contents/MacOS/STEM -clean")
- The new plugin should be installed!


-Matt
Re: headless not logging!? [message #668093 is a reply to message #667899] Tue, 03 May 2011 17:44 Go to previous message
Matthew Davis
Messages: 269
Registered: July 2009
Senior Member
Hi,

I've posted a compiled JAR of the plug-in on my Dropbox account. You can download it from here:

http://dl.dropbox.com/u/130009/org.eclipse.stem.util.loggers _1.2.0.jar

-Matt
Previous Topic:STEM V1.2.0 RC5 is ready for testing !!
Next Topic:Interventions
Goto Forum:
  


Current Time: Wed Sep 24 00:44:56 GMT 2014

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

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