22 January 2016 at 1 h 27 min #5364GaribaldeParticipant
I am trying to parallelize the visitors. I see that there is already a class created for this ParallelVisitorScheduler. However i am no sure how use it. I need to replace the existing executeVisitor() with the one from ParallelVisitorScheduler. How would i do this? is there a function association?
Thanks3 February 2016 at 15 h 30 min #5528GuillaumeKeymaster
- SOFA Consortium
Mixing threads and Visitors is a complex and still running task.
I just had a look at ParallelVisitorScheduler. This is a very old abstract class created in 2007 and not used anymore in SOFA.
Still, the algorithm looks OK so you should be able to use it : simply create your own Scheduler inheriting from ParallelVisitorScheduler and specify what to do with threadsafe Visitors in
Then, to use it, replace your
Unfortunately that’s all I can say since I’m not yet a SOFA expert.
Could someone else help us here ?
Hope it helps,
Guillaume4 February 2016 at 19 h 02 min #5545fspadoniParticipant
ParallelVisitorScheduler was developed for a project to parallelize SOFA using KAAPI multithreading library http://kaapi.gforge.inria.fr/ but there is no more support.
As far as I know no one is still working on it.
I implemented in my project some basic task based parallelism in Sofa using the Multithreading plugin.
That’s not a default SOFA plugin and it has a boost thread library dependency.
Maybe it can be helpful
Federico5 February 2016 at 0 h 22 min #5546GaribaldeParticipant
Hi fspadoni and Guillaume,
Thanks for your replies.
Fspadoni, Do you use the multthread plugin in SOFA to accomplish this? I would like to paralllelise some of the tasks also in my scene to get better performance.
Any help would be great.
Garibalde5 February 2016 at 15 h 52 min #5553fspadoniParticipant
Yes I used the Multithreading plugin
The plugin provides just a task scheduler to run concurrently tasks and few basic examples of parallelized components.
The scheduler uses the boost thread library internally but you don’t have to deal with threads.
You should decompose your algorithm in tasks.
A task is just a function that can run concurrently with other tasks.
Federico6 June 2016 at 15 h 18 min #7045HugoKeymaster
- SOFA Consortium
Did you succeed to use the ParallelScheduler as you wanted?
Can we help any further ?
Hugo20 December 2016 at 0 h 20 min #8220
- You must be logged in to reply to this topic.