yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #01908
Re: parallel?
(please reply to the list, not to me)
> I hear that OpenMP is based on Shared Memory Parallel Computing, and
> it needs random accessing to the data (I am not very sure, but just
> hear about that, if I am wrong, please forgive me and tell me the
> right thing, thanks). For my code, the contacts are stored in a list,
> that is not randomly accessable. If it is ture OpenMP needs random
> accessing, then how does YADE do that?Is it ok to run YADE on a
> distributed memory computer architecture, like in Cluster--I saw
> somebody run it on a cluster, but I do not know the cluster
> architecture. Because in a distributed memory architechture, the
> memory is not directlly accessable, which will increase the
> programming difficulty.
Both InteractionContainer and BodyContainer support integer indices,
i.e. random access. No, you cannot run yadeo n distributed memory as
each core needs access to the whole memory.
> Currently my speed is 3~4 second to do a iteration for about 100,000
> particles, and 33 seconds to do an iterations for 988,000 particles.
> I use threads to do the parallel computing, but the speed up is only
> 2.2 times faster (15 seconds for 988,000 particles.). This speed is
> terrible bad, because the dt is in the order of 10^(-7) second for the
> simulation of rock particles.
How many cores do you have? See
https://yade.hmg.inpg.fr/index.php/Speed_profiling_using_TimingInfo_and_TimingDeltas_classes to get exact idea what takes how much time (do "O.timingEnabled=True" before running the simulation, then "from yade import timing; timing.stats()" once it's over); the impact of the timing itself is in the order of a few percents.
Hm, the old link looks better:
http://yade.wikia.com/wiki/Speed_profiling_using_TimingInfo_and_TimingDeltas_classes
It is quite possible that the collider takes a lot of time in your case.
Consider using collider stride to run it only sometimes:
https://yade.hmg.inpg.fr/index.php/Insertion_Sort_Collider_Stride
See examples/concrete/uniax.py, search for
InsertionSortCollider(sweepLength=.05*sphereRadius,nBins=5,binCoeff=5)
and try if that helps. If your simulation is quasi-static, it should
help a lot. Note that the initial sort in InsertionSortCollider takes
very long: http://yade.wikia.com/wiki/Colliders_performace
(I've been calling for a long time for a better collider, but noone took
the challenge.)
Cheers, Vaclav
Follow ups
References