← Back to team overview

yade-users team mailing list archive

Re: [Question #246489]: Parallel computation

 

Question #246489 on Yade changed:
https://answers.launchpad.net/yade/+question/246489

behzad majidi posted a new comment:
Like controlling the number of elements which are assigned to each core.

look, I have a very simple script to check the efficiency of
parallelization;

#===============================================================================
id_Mat=O.materials.append(FrictMat(young=1e7,poisson=0.3,density=1000,frictionAngle=1))
Mat=O.materials[id_Mat]

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,-10])]

from yade import qt
qt.Controller()
qt.View()

id_box =
O.bodies.append(box((0,0,0),(20,20,.1),fixed=True,material=Mat))

sp=pack.SpherePack()
sp.makeCloud(minCorner=(-20,-20,.1),maxCorner=(20,20,300),rMean=.2,rRelFuzz=.5,num=40000,periodic=False)
O.bodies.append([sphere(c,r,material=Mat) for c,r in sp])

#===========================================================================================

I ran this code several times by one, two and four cores but what I obtained is like;
like: yade script.py
         yade -j2 script.py
         yade -j4 script.py


1 core ---> speed: 165 iteration/second
2 cores ---> speed: 150 iteration/second
4 cores ---> speed: 138 iteration/second

Why using more cores has a negative effect? 
This, I don't understand! I tried the same script with 300'000 balls and the same trend of calculation efficiency was obtained.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.