Benchmark

Asked by Martin Nie

hi,
I would like to perform the test mentioned on this website: https://yade-dem.org/wiki/Triaxial_Test_Parallel.
I found the script on https://github.com/yade/trunk/tree/master/scripts/checks-and-tests/triax-perf, which says:
"
 Performance test for running
#
# 1. Regular TriaxialTest with 3 independent dispatchers (geom, phys, constitutive law)
# 2. TriaxialTest with InteractionLoop (common loop and functor cache)
#
# Run the test like this:
#
# yade-trunk-opt-multi -j1 triax-perf.table triax-perf.py
#
# The -j1 ensures that only 1 job will run at time
# (even if other cores are free, access to memory is limiting if running multiple jobs at time)
#
# You have to collect the results by hand from log files, or run sh mkTextTable.sh and use
# triax-perf.ods to get comparison
#

utils.readParamsFromTable(fast=False,noTableOk=True)
TriaxialTest(numberOfGrains=50000,fast=fast,noFiles=True).load()
O.run(10,True) # filter out initialization
O.timingEnabled=True
O.run(200,True)
from yade import timing
timing.stats()
print 'ForceContainer synced %d times'%(O.bexSyncCount)
"
I've some questions: How can I start yade with "yade-trunk-opt-multi"?
If I try TriaxialTest(numberOfGrains=50000,fast=fast,noFiles=True).load(), there there is no "fast" defined.
And in the end, there is neither O.bexSyncCount in Yade docs.

It would be nice, if you could help me.

Martin

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi Martin,

for "yade-trunk-opt-multi", it's only an executable name that the guy, who wrote this script, was used to use... Probably it means that this yade executable was compiled with OPENMP option (https://www.yade-dem.org/doc/installation.html#compilation)

For the "fast" option, indeed it seems to not exist anymore... The problem is that this wiki page is 4 years old (your question raises the issue of keeping the wiki up-to-date...). So, I'm unfortunately not surprised that you face difficulties to reproduce what's there.

What did you want to achieve with these benchmarks scripts ?

Revision history for this message
Martin Nie (martin-niehoff) said :
#2

Thank you for your quick answer.
My intention by using these skripts is to prove, that the long duration for simulating many particles is not caused by an operating error. I would like to see, if my performance is comparable to the documented performance. Thus I'm searching for a working skript und a documented benchmark, that might allow a comparison.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

Hello,

The benchmark you mention (wiki) is quite old, that is why some of the variables disapeared.
There has been a number of optimizations done after this benchmark. Note that more recent tests have been done by Christian Jakob [1].

> How can I start yade with "yade-trunk-opt-multi"

This is just the name of yade executable. It could be "yadedaily" or any other name you give to a particular build.

> there is no "fast" defined

For experimentation, we could run in "fast" or "non fast" modes at that time. Since "fast" was effectively faster, the "non fast" option has been simply removed.

>O.bexSyncCount

... is still in the code but with a different name (ForceContainer::syncCount). It counts the number of synchronization of forces computed in different threads (for parallel versions only). Not a very important parameter. Again it was for experimentation at that time, we know now that there is one sync per time-step, as it should be.

We are always interested in benchmark tests reports and to publish them on the website. Please let us know if we can help to define the test case.

The main question is if you want to evaluate perfs in a quasistatic simulation, like a triaxial test, or in a more dynamic situation, like gravity deposition. The results can be very different. Considering that [1] is more on the dynamic side, I would suggest to focus on a static situation:
- first, generate a dense packing for triaxial simulation with N particles, and save it;
- second use it as an initial state for the benchmark (experimenting different numThreads and different tunings of collision detection parameters).
- change N and check again.

I hope it helps.

Bruno

[1] https://yade-dem.org/wiki/Comparisons_with_PFC3D

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

I see #1 and #2 just now.
What are you simulating, and what is the number of particles?

Revision history for this message
Martin Nie (martin-niehoff) said :
#5

I'm simulating particles in a bowl. The bowl tumbles at high frequency, that equals vibration. The number of particles should be approximately 5500. The radius is set to R=0.01. Due to simulation time, I decreased the number to 1000. Furthermore I tried to perform the same case with polyhedra shaped particles.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

It sounds similar to Christian's benchmark of spheres falling on a plane. It makes sense to compare to compare the iter/sec in both cases.. Overal

Revision history for this message
Anton Gladky (gladky-anton) said :
#7

Hi,

there is an option --performance in yade (see help or
manpage). It should work in your case.

Anton

Revision history for this message
Martin Nie (martin-niehoff) said :
#8

The option --performance works, but there are no reference values, I could compare to. Do you know, if there are reference values? The test of Christian Jakob is a good solution.

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#9

You could post your code (particles in a bowl). I could run the code on my computer for example if you like. maybe someone else will do so, too. This way we could compare calculation times and add them to the wiki.
what do you think?

Revision history for this message
Martin Nie (martin-niehoff) said :
#10

I think that's a great idea. But it could take a some hours.

Here is the skript:

from yade import pack
from yade import ymport, qt

facetMat=O.materials.append(FrictMat(density=7850,young=210e9,poisson=.25))
sphereMat=O.materials.append(FrictMat(density=7850,young=210e9,poisson=.25))
fctIds=O.bodies.append(ymport.stl('bottich_triangles_unit_meter-binary.stl',color=(1,1,1),wire=True,fixed=True,material=facetMat))

amplitude=((2*pi)/360)*.75
sphereRadius = .01
nbSpheres = (10,10,10)
for i in xrange(nbSpheres[0]):
    for j in xrange(nbSpheres[1]):
        for k in xrange(nbSpheres[2]):
             x = (i*2 - nbSpheres[0])*sphereRadius*1.15
             y = (j*2 - nbSpheres[1])*sphereRadius*1.1
             z = (k*2 - nbSpheres[2])*sphereRadius*1.15
             s=sphere([x+.1,y+.1,z+.15],sphereRadius,sphereMat,color=[1,1,6])
             O.bodies.append(s)
#sp=pack.SpherePack()
#sp.makeCloud((-0.2,-.2,.1),(.2,.2,.4),rMean=0.01,rRelFuzz=0,num=10000)
#sp.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      # handle sphere+sphere and facet+sphere collisions
      [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.75),
   HarmonicRotationEngine(ids=fctIds,rotationAxis=[0,1,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=amplitude,f=30,dead=False,label='auslenkung',fi=pi/2),

   CombinedKinematicEngine(ids=fctIds,label='comb',dead=True) + HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=amplitude,f=30,dead=False,label='xRot',fi=0)
+ HarmonicRotationEngine(ids=fctIds,rotationAxis=[0,1,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=amplitude,f=30,dead=False,label='yRot',fi=pi/2),

   #VTKRecorder(fileName='paraview/3d-vtk-',recorders=['all'],virtPeriod=0.05),
   qt.SnapshotEngine(fileBase='video/3d-',virtPeriod=0.005,label='snapshot'),
   PyRunner(command='finish()',virtPeriod=1),
   PyRunner(command='status()',iterPeriod=1000),
   PyRunner(command='finish_auslenkung()',virtPeriod=0.0083, nDo=2),

]
O.dt=.5*utils.PWaveTimeStep()

def status():
 print 'iteration:' + str(O.iter)

def finish():
 print 'finished'
 utils.makeVideo(snapshot.snapshots,'video/3d.mpeg',fps=10,bps=10000)
 O.pause()

def finish_auslenkung():
 print 'auslenkung'
 auslenkung.dead=True
 comb.dead=False

print 'run'
O.run()

You can find the bowl here:
https://dl.dropboxusercontent.com/u/44982717/bottich_triangles_unit_meter-binary.stl

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#11

I ran your script on our machine using 1core. It took about 1h 55 minutes (according to the creation time of the first and the last picture created by the snapshot engine)
How long did it take at your machine?
I will test it with 2 and 4 cores now.

btw: which program did you use to create such stl model? what application are you modelling with this script? I wonder about the high damping in the integrator.

Revision history for this message
Martin Nie (martin-niehoff) said :
#12

It took about 2h 47min.

Revision history for this message
Martin Nie (martin-niehoff) said :
#13

Regarding .stl: I used a ruby skript to convert ascii to binary, cause Yade only accepts binary.

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#14

ok here are the next results:
2 cores: 8h 52min
4 cores: 11h 11min

Quite interesting results, I think. I did not expect this.
For your script multicore simulation doen't make sense but why is that?

Can you help with this problem?

Provide an answer of your own, or ask Martin Nie for more information if necessary.

To post a message you must log in.