Say I build a model and call the analyze command once for at each time step (contained within a while loop; i.e. set ok [analyze 1 $dt]) as opposed to doing it all at once (i.e. set ok [analyze $numSteps $dt]). Assuming everything converges and no other commands are contained within the while loop, is it significantly slower to run the model like this or is it not noticeable at all?
The motivation is that I'm interested in creating a custom recorder that prints iterations and iteration norms via the "puts," "testIter" and "getNorms" commands and my model is already fairly intense computation-wise.
Thanks in advance!
Performance of Analyze Command
Moderators: silvia, selimgunay, Moderators
Re: Performance of Analyze Command
depends on the time taken in an analysis. if it takes a long time then this is not noticable, if it takes a very very short time then it may be. why don't you test it ans see for yourself.
Re: Performance of Analyze Command
Will do, I've been playing around with existing tcl commands to pull the time for a given block to run. I was mostly interested if there was any overhead involved when the analyze command gets called (much like how the CPU has to save an address when a function is called in typical programming). I'll test it out.
Re: Performance of Analyze Command
Try wrapping the analyze commands with Tcl's built-in [clock clicks] command