6 January 2021 at 1 h 03 min #18111
I’m trying to get the computation times with the runSofa argument ‘–computationTimeSampling’ in batch mode. It works well with the GUI where the times print on the stdout, but in batch mode (with ‘-g batch’) the times are not displayed. Is there a way to print the computation times in batch?
I tried to change the output type (‘–computationTimeSampling’) to json or ljson, but I can’t find any json or ljson files anywhere, regardless of rather I’m using batch or the GUI.
Thanks in advance,
Francois6 January 2021 at 14 h 46 min #18113
If I remember correctly, the computationTimeSampling option requires an integer and will set the frequency (in number of steps) at which the computation times are printed. For example, setting
runSofa -g batch --computationTimeSampling 2will print at every 2 steps. It is 0 by default, which means that it will never be printed.
--computationTimeOutputTypeoption will instead specify the format to be printed (text or json)
J-N6 January 2021 at 18 h 09 min #18114
Yes, I included an integer for the sampling frequency. It only prints the times when using the gui. Whenever I add
-g batch, the times are not printed. Is it normal?
ljsonsupposed to write the times in a file? I can’t find the location of these files, or rather they are created at all.
Francois7 January 2021 at 12 h 00 min #18118
I’m not sure why you aren’t having the output. I just tried running it on the default scene (
runSofa -g batch --computationTimeSampling 1) and I got the timer output. Could you also try it on the default scene (by not specifying any scene file)?
--computationTimeOutputType jsonwill still output the timer on the stdout (your terminal), but using a json format.
J-N8 January 2021 at 0 h 40 min #18127
I don’t get the timer output in batch mode with the default scene too. I get the other kinds of output though, like the ones you get by setting
printLog = 1in various components.
Tomorrow I’ll try to investigate if the program reaches
TimerData::print(), which is where the timer output seems to be printed.
François8 January 2021 at 8 h 46 min #18133
Thank you for taking some time to investigate this. It could very well be a bug.
Could you tell me which version of SOFA you are using? Did you download the binaries from the website or did you compiled it? If you compiled SOFA, could you give me the last git commit (
git log --oneline -n 1)?
J-N8 January 2021 at 17 h 40 min #18160FroyParticipant
- SOFA Consortium
I stumbled on this bug myself yesterday 😤, and it should be fixed with the PR #1698. (hopefully it will be quickly merged in the master branch)10 January 2021 at 16 h 35 min #18169
- You must be logged in to reply to this topic.