Question #690973 on Yade changed: https://answers.launchpad.net/yade/+question/690973
Bruno Chareyre proposed the following answer: > I understand you suggestion to get the optimal price of cores. But now for me, to get the fastest speed of the simulation is the aim. Yes. That's exactly my point. It could be that the fastest is -j1, or that it is just equal. Here is some bad news: if you write an ordinary python program and you assign more than one openMP thread to it, the change of execution time will be null. You can try on your server by running a minimal program, just try this in the command line: :~$ export OMP_NUM_THREADS=1 :~$ time python3 -c "for k in range(int(1e7)): a=k**0.124" real 0m2.240s user 0m2.190s sys 0m0.009s Then: :~$ export OMP_NUM_THREADS=96 :~$ time python3 -c "for k in range(int(1e7)): a=k**0.124" real 0m2.190s user 0m2.181s sys 0m0.008s That's how programming works in many cases. The variable OMP_NUM_THREADS is even not used when python runs. It is the same for your PyRunners. The fact that yade is parallel doesn't make *your* program parallel. Here is the good news: If you have to train your algorithm on many realizations then you can train 96 cases simultaneously (assuming RAM is enough). Which will be *much* faster. You can, either, hire colleagues to have more hands clicking the open/close for 96 planks (will need many keyboards/mices with long cables for social distancing), or (safer) do it with hard numbers as Jan suggested. If really you have no choice but running one single script at a time, then you need to re-think what your simulation script is doing - with a good idea of where/how time is spent. B. -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

