yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00496
Re: run faster by +16% with r1402
> I'm supervising his job. And I'm already experienced with
> boost::thread, which yade uses in some places. So it may be a sad
> news for you, but the in-engine parallelization will be done using
> boost::threads. We will see how it will affect the problem caused by not
> being able to random access the containers.
>
OpenMP keeps pool of threads instead of creating new threads every time
it enters parallel section. I assume boost::threads is going to do just
that. I didn't measure that, but creating thread requires context switch
(AFAIK - interaction with the kernel) and I think that will be quite
expensive.
No, it is not sad news at all - if boost::threads will be faster, I will
be only happy to use it. The openMP and ParallelEngine took me about 3
hours, so it is no big deal. But, heck, I need that _now_, that is why I
did it.
> - he has to do a parallel loop over all interactions and add force
> to each id1 and id2. Doing it in parallel will involve some mutexes
> to block the access to particular force[id1] so that another thread
> will not attempt to modify it.
>
The lock-free containers would be nice thing to have, for sure - if that
is what you mean.
Vaclav.
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
Follow ups
References