Page 1 of 1

Display time as the simulation progresses

Posted: Thu Mar 02, 2017 5:15 pm
by shyam_u2
I am running a network model in using Parallel NEURON. I want to display the following while the model is running:

The "biological" millisecond and the real time taken (in seconds) to run for that particular millisecond, FOR EACH HOST.

For example, if running on 3 hosts,

"running millisecond 1 in host 0, time taken = 4 .1 seconds"
"running millisecond 1 in host 1, time taken = 4.2 seconds"
"running millisecond 1 in host 2, time taken = 4.32 seconds"

I would appreciate if someone could help me.

Thanks in advance

Re: Display time as the simulation progresses

Posted: Fri Mar 03, 2017 11:46 am
by ted
1. First develop serial code that does what you want.
2. Then modify it so that it works in parallel simulations.

1. A good strategy is to use an FInitializeHandler and the CVode event method. You'll find some useful material in this thread
Time-varying maximal conductance

2. The code you developed for 1 will work in a parallel simulation but you need to ensure that only one host executes it--specifically host 0. Left as an exercise to the reader: why only one host, and why host 0? And how can execution of one or more statements be restricted to host 0?