Anything that doesn't fit elsewhere.
- Posts: 24
- Joined: Thu Sep 10, 2015 1:34 pm
I am currently running simulations on NSG where I have input session files containing my multi-compartment model and several MultipleRunFitter windows. In the simulations the code iteratively optimizes the synaptic parameters of a single synapse for each compartment. The optimized parameters are saved to vectors and the vectors are saved to .dat files in the output folder. All of this works fine so far, but I also would like to save the "final state" of my model (i.e. containing optimized synaptic parameters and synapses across the entire dendritic arbor) so that I can later just load it up if I wanted to perform additional simulations with the optimized synaptic parameters. I have tried doing this with the save_session function, however these files are not being added to my NSG output files and yet no errors are being reported. When I test it out on my laptop (mac), it works fine and a session file is generated. It also works (i.e. generates a session file) when I test out the function on my Ubuntu desktop when no GUI windows are open (i.e. after I've entered the nrniv command). I've tried out the following code to try and troubleshoot the problem:
Code: Select all
load_file("IS3_M2_Case9StarRevised.hoc") // Loads IS3 model with full morphology & properties (as well as parameters and point processes)
load_file("Case9StarModelMRF3.ses") // Loads Multiple Run Fitter session file
val = save_session("./EndSessionFile.ses")
printf("save_session returned = %d", val)
In all cases, the return value for the session_file function is 0 (i.e. for NSG outputs, Mac with the GUI, and Ubuntu with and without the GUI) however only when using NSG is there no session file being generated. Unfortunately, I'm ignorant as to why NSG is not generating these files. Is there an alternative to save_session that I should be using for saving the "final state" of my model using NSG with all of the final parameter values intact?
- Site Admin
- Posts: 5727
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
If NEURON is compiled --without-iv, a working hoc program will still run, but no attempt will be made to draw anything to the (nonexistent) graphical user interface. The documentation for save_session() says
. . . save_session("filename")
. . .
Save all the (saveable) windows on the screen to filename.
On a machine that has no GUI, there will be no NEURON windows at all, so the session file will necessarily be empty.
If you are performing optimizations and need to save parameter values in an environment in which NEURON has no GUI, you'll have to write your own procedures for printing them to an output file, and reading them from such a file and restoring them to your model and/or optimizer tool, as appropriate.