Python based benchmarks #4404
alxbilger
started this conversation in
Share your achievements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is already a C++ application running benchmarks using code from SOFA: https://github.com/alxbilger/SofaBenchmark.
Recently, I added a Python script able to run benchmarks on SOFA scenes: https://github.com/alxbilger/SofaBenchmark/blob/7372147a206eccba545017e003420b596998d3f5/python/run.py. It makes the bridge between Google Benchmark (its Python bindings) and SOFA scenes.
In this script, I run the same simulation (a cantilever beam made with corotational hexas) but each time I change the number of elements and the type of the linear solver. The measures of performances is manual, not managed by Google Benchmark. To make the measurement, I take the result of a SOFA timer measuring the duration of the linear system solving.
Example of output:
Remember here that those results are specific to the simulation. One solver can stand out in this cantilever beam benchmark, but a change of parameter, or totally different SOFA scenes, may change the results. Note that the cost of the matrix assembly (not measured in this benchmark) differs depending on the solvers, and may have an impact on the simulation performances.
Overall, this type of Python script is a convenient way of selecting a component (or a scene design) based on the performances.
Beta Was this translation helpful? Give feedback.
All reactions