yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00494
Re: run faster by +16% (and enlarge your p*n*s size ; -) ) with r1402
> This is really interesting.
> It sounds like we could nest paralellizations, with parallelized engines
> runing in parallel
>>> however, running the loops in parallel is not necessarily a speed
>>> gain.
>>>
>
> How comes?!
>
There is some overhead when starting parallel block, so I think that for
simple-scene parallelization this may actually hurt (I get 1.75e4
iters/sec witm OMP_THREAD_NUM=1 and 1.5e4 with 2). But for large
simulations, where you have around 10 iter/sec or less, even nested
parallelization may offer some benefit. To enable it with openMP, you
just define OMP_NESTED (http://docs.sun.com/source/819-0501/2_nested.html).
The interaction container, however, will need to have a 1D index - for
example creating a vector<interactionId,shared_ptr<Interaction> > that
would be refreshed at every iteration, after the collider creates
interactions. But we would have to make sure that only the collider
adds/deletes interactions. Currently, we have to loop over iterations
with the iterator (no random access).
ParallelEngine was just what I cooked up this morning, since I thought
it was a low-hanging fruit; but I think the summer student will have to
run bunch of benchmarks to determine where it is worth to parallelize
and where not (and for what number of bodies and interactions etc).
Regards, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
Follow ups
References