[Archive] Get simulation data when SPIS freezes

Message by Nuno Loureiro:
Hi all,
I ran I simulation during 1 day, but after it was finished SPIS buttons froze and I could not extract data. I have two questions regarding this issue:
1- Is there a way of exporting the data with Jyconsole when something like this happens?
I have tried the exportDataField.py but it seems not to be working. I always get this message: AttributeError: ‘NoneType’ object has no attribute ‘getNodeList’
2- Even if I did not save the project, I still have the data in the temporary file created by SPIS (for example I have the files potentials.txt and emittedCurrent.txt ).
Is there a way to import these values again to SPIS or simply use them with Paraview or Cassandra?
Thanks,
Nuno

Message by Ignacio Rocca:
Hi Nuno,
I understand that there is no way to export data when SPIS freezes, lke you says you have the currents and the potentials on the temporary folder, for other hand I recomend to you that before to run the simulation, exactly when export from UI to NUM, save the project.
Best Regards
Ignacio

Message by julien:
Dear Nuno, dear Igniacio,
You outline a “recent problem” (actually a old one but more frequent with the recent versions), that also depends on the OS/JVM. I have no general solution for the moment. But I will try to give some partial answers:

  1. I have observed that this problem appears more frequently with the recent (1.6) JVM, when the memory stack limit is reached. Surprisingly, when the JVM has no more memory free, it does not always crash as before but induce deadlock and may freeze the Swing layer. When this happens we did not found any solution yet. And generally, this appears at the end of the simulation, where we have an other load of memory cost.
    But you may avoid this by:
  • Increase your memory stack before the run, increase the -Xmx value through the JVM\_XMX flag in the launching scripts (e.g export JVM\_XMX=3000m in spis-ui.properties for SPIS 4.2+).
  • Regularly force the garbage collector, using the jconsole tool of your JVM. Launch it is another shell. Connect to the SPIS job (Jython). Go to the memory index and click on "Perform GC". This may reduce the RAM footprint. At that time, extract the data and save the project.
2) The simulation may be costly in RAM. You may have interest at the end of the simulation and after the data extraction, to save the project, close the current SPIS, re-open it and reload the project with loading the DataFields and MeshField. The final memory foot-print will be lower and the post-processing will be easier. NB: To avoid a too long reload phase move the DataFields that you don’t want reload into another directory. 3) During the modelling (i.e when you run SPIS), a lot of data are temporary saved in the /tmp directory (à the disk root or in TEMP under Windows, depending on the SPIS versions). If your simulation crash or freeze, you may found partial information here. 4) The message: AttributeError: 'NoneType' object has no attribute 'getNodeList' appears when the DataField dictionnaries have been removed from the DataBus Manager (typically after a Clean Data Bus Action). For the moment to re-initialise them correctly, click on "Map Fields" (pre-proc) before to call back another time the "Extract Data" function. We are working on this bug. 5) Dead locks may also appears depending on your OS. Windows (at least XP and lower) does not support very well a high number of threads. The data extraction phase is highly multi-threaded and may freeze the application. Reduce the maximum number of thread as defined in the SPIS\_ROOT/SpisUI/Bin/config.py file. 6) Sometime under old versions of Linux KDE, the Swing layer freeze without reason. I have no solution, excepted using the batch mode of SPIS for large simulations. Hope that may help, Julien Forest (Artenum's crew)