Excimontec icon indicating copy to clipboard operation
Excimontec copied to clipboard

Feature: state saving

Open kostergroup opened this issue 5 years ago • 1 comments

Dear Mike,

Here are the changes we implemented in Excimontec to allow state saving. There are some changes to be made before we can merge as for example, the tests do not currently run as we added the random seed to the OSC_Sim::init() function. Also the changelog still has to be modified and a test is still to be written for the import and export occupancy functions.

The code does run without problems on our cluster as is.

I would very much like to hear your opinion on our changes and your ideas on what we should add before we can merge to the main repository.

Kind regards, Marten

kostergroup avatar May 08 '20 14:05 kostergroup

I did a major refactor and got everything working now in preparation to get this into a v1.1 beta release. It would be good if you could test out this new version on your cluster to make sure it works well.

Right now the generator seed is set via command line arguments like so, Excimontec.exe parameters.txt -seed 100 which sets the seed to 100. Enabling a steady transport test to be resumed is also done via command line argument. Running a steady transport test will automatically create a site energy file and state files during the equilibration phase. The occupancy information in the state file is compressed using run length encoding so they take fairly little space and don't use much IO. You can adjust the state saving interval in the parameter file to your liking, but a value of 10,000 events is used by default. You can resume a steady transport test by having the state files (STT_equilibration_state_#latest.txt) and the site energies files (site_energies#.txt) in the working directory and restarting the simulation like so Excimontec.exe parameters.txt -seed 100 -resume_stt When resuming the simulation, it will start where it left off in the equilibration phase and continue the steady transport test. You do not need to worry about if the processors get out of sync since they will each get resumed and continue to the same stopping condition.

MikeHeiber avatar Jun 04 '20 05:06 MikeHeiber