Home › Forum › SOFA › Using SOFA › [SOLVED] ComputationTimes and batch
Tagged: 64_bits, Linux_mint, Plugin_other, SOFA_1906
- This topic has 7 replies, 3 voices, and was last updated 3 years, 10 months ago by Francois.
-
AuthorPosts
-
6 January 2021 at 01:03 #18111FrancoisBlocked
Hi!
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,
Francois
6 January 2021 at 14:46 #18113jnbrunetModeratorHey @fleonard,
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 2
will print at every 2 steps. It is 0 by default, which means that it will never be printed.The
--computationTimeOutputType
option will instead specify the format to be printed (text or json)J-N
6 January 2021 at 18:09 #18114FrancoisBlockedHi @jnbrunet,
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?Also, is
--computationTimeOutputType json
orljson
supposed to write the times in a file? I can’t find the location of these files, or rather they are created at all.Francois
7 January 2021 at 12:00 #18118jnbrunetModeratorHey Francois,
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)?The option
--computationTimeOutputType json
will still output the timer on the stdout (your terminal), but using a json format.J-N
8 January 2021 at 00:40 #18127FrancoisBlockedHi @jnbrunet,
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 = 1
in 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çois
8 January 2021 at 08:46 #18133jnbrunetModeratorHey Francois,
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-N
8 January 2021 at 17:40 #18160FroyKeymasterHi,
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:35 #18169 -
AuthorPosts
- You must be logged in to reply to this topic.