2

I'm attempting to conduct a batch run of a model through the Simphony GUI. I have text sink with relative path "./Test_Data_FileSink" created in my scenario tree. This file is created and saved with single runs through the GUI. However, when I conduct a batch run, no file is created within the localhost instance. When I navigate to the instance, I see a debug.log, FAILURE_null, instance.log, and param_input.txt, but no Test_Data_FileSink file. The batch process attempts to compile the data across instances and returns an empty batch_param_map.txt and Test_Data_FileSink.txt within the designated output location.

Warning message is displayed through Batch Run Configuration Window below:

'WARN [SwingWorker-pool-2-thread-1] 12:15:28,906 repast.simphony.batch.ssh.OutputFinder - No model output found matching glob:{**\,}Test_Data_FileSink_ModelOutput*.txt in C:\Users\user\AppData\Local\Temp\simphony_model_1582046063159\instance_1'

There is an additional error in the batch run console log where the model might be looking for the UI.

repast.simphony.batch.InstanceRunner - Error while running model java.lang.NoClassDefFoundError: repast/simphony/ui/RSApplication

The GUI UI does allow for parameter input, but I can't see where the model depends on it to run if the parameters are already set. I've attempted to insert some conditional statements around setting the UI

if (!RunEnvironment.getInstance().isBatch()) {
 // do your GUI specific elements here
}

This breaks initialization of Simphony if I don't allow the UI to be rendered and doesn't seem to have much effect in the locations I've found it to work.

What else should I be trying?

JD Caddell
  • 313
  • 1
  • 9
  • 1
    I'm thinking the model doesn't run because of the error you reference above. Do you reference the RSApplication or any Simphony internal classes in your model. We don't include the GUI runtime in the batch payload jar because it shouldn't be necessary, in fact, on some headless server resources, referencing a Java GUI element can cause an error. – Nick Collier Feb 18 '20 at 21:49
  • I'd started working off your geoZombies demo (for context). It does reference the RSApplication inside of the setUIEffects() function. When I attempt to disable the RSA call with the previous batch conditional statement, it creates an error and fails to load Simphony. I get similar behavior when I do the same thing inside of the static setUIEffects() call inside the ContextCreator. I'll keep checking for links and troubleshooting. – JD Caddell Feb 19 '20 at 15:15

1 Answers1

3

The SpecialEffects class in the GeoZombies model references the RSApplication class which isn't available in the batch classpath, and it's not needed in batch anyway since all it does is provide some visual and sound effects, it can be removed from the model.

  1. Delete the SpecialEffects class
  2. In ContextCreator delete the static call to SpecialEffects.setUIEffects();
  3. In Human agent, delete the call to SpecialEffects.getInstance().playEnragedZombies();
  4. In Zombie agent, delete calls to SpecialEffects.getInstance()...
Eric Tatara
  • 660
  • 3
  • 12
  • 1
    Perfect Sir. Works without issue. Thank you for the continued support of Repast. Lots of learning going on over here. – JD Caddell Feb 22 '20 at 17:20