Use of SoftRobots in High Performance Computing #252
Replies: 3 comments 14 replies
-
Hi, ParallelTetrahedronFEMForceField has been introduced in January. That is why it is not available in previous versions. See sofa-framework/sofa#3552. Parallel components are usually not trivially parallelized. They have synchronization mechanism, which means the speed up does not match the number of CPUs. In addition, the speed up due to parallelism of a component affects only a part of a time step, not the entire time step. Not knowing the scene, here are my guesses if you observe no improvement:
I advise to run a few time steps and to analyze the timers: https://www.sofa-framework.org/community/doc/using-sofa/performances/inspect-performances/ Alex |
Beta Was this translation helpful? Give feedback.
-
HIi @alxbilger, Thank you for your response. 1- Yes, I am using a linear solver (LinearSolverConstraintCorrection). What would be an alternative to avoid the sequential execution due to its presence? 2- Yes, I am computing forces, but this is unavoidable for me due to the nature of the study I am conducting. I look forward to a solution that includes the parallelized version of this. 3- I have used the AdvancedTimer profiler, and I cannot verify any speed-up. Both steps ConstraintSolver and Collision Detection take around 50% of the time either in my PC or in HPC. 4- I tried to run SOFA without the graphical interface to test it (using the argument -g batch), but it accuses the error: However, the SofaPython3 was loaded. This happens in versions 22.12 and 23.06 on both Windows and Linux. Any idea about how to solve it? |
Beta Was this translation helpful? Give feedback.
-
Hi @alxbilger, Consider these blocks of code as the options I tested. Here we have blocks A1 (uncommented) vs B1 (commented) :
Here we have A4 (uncommented) vs B4 (commented):
As you may notice, all B blocks are attempts to extract some performance improvement vs the ordinary approach (A). As you can see, bottlenecks are the buildStiffness and the numeric_factorization. So, for the case where I had all blocks B, i.e, what was commented became uncommented and vice-versa. As you see, in this case, WaitFreeMotion is the bottleneck. Now, my question is given the above mentioned bottlenecks, is there a way to optimize them? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have a few questions about using the SoftRobots plugin in High-Performance Computing. To explore its total capacity, I am also using the SOFA MultiThreading.
First, SOFA version 23.06 does not come with the SoftRobots tutorials folder. Is this permanent?
Second, in version 22.12 I cannot use the component "ParallelTetrahedronFEMForceField". It accuses the error:
Python
exception:ValueError: Object type ParallelTetrahedronFEMForceField was not created
The object 'ParallelTetrahedronFEMForceField' is not in the factory.
But the following exits:
: ParallelHexahedronFEMForceField (92% match)
: TetrahedronFEMForceField (85% match)
: HexahedronFEMForceField (76% match)
: StandardTetrahedralFEMForceField (75% match)
: TetrahedronDiffusionFEMForceField (73% match)
: TetrahedralCorotationalFEMForceField (70%
match)
However, the same component is allowed in version 23.06. Was that a bug fixed?
Third (and most important), I have a scene where I am using the Multithreading plugin, components ParallelTetrahedronFEMForceField (just available in 23.06), ParallelBruteForceBroadPhase, and ParallelBVHNarrowPhase. The scene has a large number of tetrahedrons (seriously!) and runs in an HPC with a large number of CPUs. However, I verified no improvement in computational time compared to the same scene without the mentioned components (without Parallel...) or even when it runs on my Personal Computer with much fewer cores. Any clue about this behavior?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions