run with Yadedaily

Asked by Alireza Sadeghi on 2020-02-14

Hello All,

I am using yadedaily and I want to use parallel computation. I typed "yadedaily -j8 test.py", but the yade just used one CPU. I checked it in the System Monitor in Ubunto 18. My yadedaily is the version of 20200213-3366~7bb55ad~bionic1.
Could you please help me if you have some ideas?
Thank you very much.

Best Regards,

Alireza

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Alireza Sadeghi
Solved:
2020-02-19
Last query:
2020-02-19
Last reply:
2020-02-18

Hi, it depends on "test.py" a little (the content of it)... therefore I have no idea.
Bruno

Robert Caulk (rcaulk) said : #2

Ya Bruno, I was going to predict this warning:

"The number of bodies is probably too small for allowing more threads, or the geometry is flat. The contact detection should succeed but not all available threads are used."

Is being printed in his terminal. Am I right?

Alireza Sadeghi (asadeghime) said : #3

Hello,

Thank you very much for your answers. I want to simulate a PeriTriaxController test with 12485 particles. I am using clump instead of spheres. Yes, you are right, when I used 500 particles in the same code, I can sun it in parallel.
What should I do now?
Thank you very much.

Best Regards,

Alireza

P.S. my code is:

from yade import utils, plot
from yade import pack, qt
from datetime import datetime

qtr=qt.Renderer()
qtr.bgColor=(1,1,1)

#===========================================================
#==================set a periodic boundary==================
#===========================================================

O.periodic=True
O.cell.refSize=(5e-2,5e-2,5e-2)

#==============================================================
#================= define the materials =======================
#==============================================================

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 0.31, fragile=False, label='aggregate-48'))

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= True, young=6.81e8, density=1532.2, poisson=0.3, frictionAngle= 0.31, fragile=False, label='aggregate-814'))

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= False, young=2e11,
density=1523.6, poisson=0.3, frictionAngle= 0.28, fragile=False, label='wall'))

#===============================================================
#===================clump shape=================================
#===============================================================

radz1=[0.355155e-3,0.505113e-3,0.397713e-3,0.465286e-3,0.484395e-3,0.394534e-3,0.493151e-3,0.487328e-3,0.613619e-3,0.413455e-3]
poz1= [[1.13418e-3,-0.703895e-3,-1.20338e-3],[-0.390408e-3,0.476061e-3,-0.150612e-3],[-0.556545e-3,0.451341e-3,1.1495e-3],[-0.633942e-3,0.498253e-3,0.348231e-3],[0.0256934e-3,0.388855e-3,-0.733445e-3],[-0.218563e-3,0.504478e-3,1.54117e-3],[-0.319601e-3,0.104778e-3,0.742895e-3],[0.650678e-3,-0.76675e-3,-0.289908e-3],[0.0113115e-3,-0.207684e-3,0.00255944e-3],[0.594902e-3,-0.301473e-3,-0.878654e-3]]
template1= []
template1.append(clumpTemplate(relRadii=radz1,relPositions=poz1))

radz2=[0.330164e-3,0.504115e-3,0.399587e-3,0.614205e-3,0.466444e-3,0.495302e-3,0.394324e-3,0.486898e-3,0.444037e-3,0.489396e-3]
poz2= [[1.16386e-3,-0.70706e-3,-1.25222e-3],[-0.39596e-3,0.482385e-3,-0.144097e-3],[-0.554928e-3,0.448475e-3,1.14685e-3],[-0.00361766e-3,-0.198211e-3, 0.00106559e-3],[-0.633362e-3,0.490424e-3,0.357391e-3],[0.0434148e-3,0.367924e-3,-0.736319e-3],[-0.218749e-3,0.504703e-3,1.54165e-3],[-0.311777e-3, 0.101954e-3,0.750235e-3],[0.621565e-3,-0.779387e-3,-0.179029e-3],[0.711114e-3,-0.503202e-3,-0.795602e-3]]
template2= []
template2.append(clumpTemplate(relRadii=radz2,relPositions=poz2))

radz3=[0.959101e-3,0.774782e-3,0.924682e-3,0.882986e-3,0.572207e-3,0.875338e-3,0.499054e-3,0.582586e-3,1.03184e-3,0.561428e-3]
poz3=[[-0.742455e-3,-0.539002e-3,0.030705e-3],[0.800775e-3,1.00778e-3,0.366095e-3],[-0.217508e-3,-0.423924e-3,-0.671114e-3],[0.65016e-3,0.741405e-3,0.305558e-3],[-0.770717e-3,0.423006e-3,0.33259e-3],[0.20475e-3,-0.707669e-3,-0.332745e-3],[-0.0356616e-3,1.34122e-3,0.703809e-3],[0.64889e-3,0.340976e-3,-0.456228e-3],[0.258817e-3,0.13357e-3,0.178886e-3],[0.35466e-3,1.36934e-3,0.583507e-3]]
template3= []
template3.append(clumpTemplate(relRadii=radz3,relPositions=poz3))

radz4=[1.18842e-3,1.0381e-3,0.664711e-3,0.531753e-3,0.853808e-3,0.789023e-3,0.717061e-3,1.0081e-3,0.967001e-3,0.535189e-3]
poz4=[[-0.0354242e-3,-0.245642e-3,-0.0514299e-3],[0.444228e-3,-0.342353e-3,-0.327639e-3],[-0.815227e-3,1.41647e-3,-0.246128e-3],[1.38493e-3,-0.405625e-3,-0.69207e-3],[0.608272e-3,0.0171296e-3,0.863712e-3],[-0.191982e-3,-1.05752e-3,-0.341411e-3],[-1.08258e-3,-0.336001e-3,-0.482846e-3],[-0.396508e-3,0.47029e-3,0.0820364e-3],[0.486211e-3,0.345623e-3,0.492724e-3],[-0.0502768e-3,0.977767e-3,0.467401e-3]]
template4= []
template4.append(clumpTemplate(relRadii=radz4,relPositions=poz4))

radz5= [0.734571e-3,0.933485e-3,0.483025e-3,0.563064e-3,0.457405e-3,0.955996e-3,0.722849e-3,0.71635e-3,0.486014e-3,0.735338e-3]
poz5= [[-0.452026e-3,-0.455606e-3,-0.0619758e-3],[-0.126025e-3,0.168901e-3,0.0762994e-3],[-1.6211e-3,-0.316016e-3,1.23288e-3],[-0.715097e-3,0.497059e-3,0.0664344e-3],[0.220643e-3,0.879083e-3,0.344862e-3],[0.394206e-3,-0.220853e-3,-0.189581e-3],[-0.998749e-3,0.0346725e-3,0.758223e-3],[0.518915e-3,0.743702e-3,-0.383334e-3],[0.877614e-3,0.598898e-3,-0.809004e-3],[1.00845e-3,-0.510125e-3,-0.532033e-3]]
template5= []
template5.append(clumpTemplate(relRadii=radz5,relPositions=poz5))

radz6= [0.669163e-3,0.605307e-3,0.67795e-3,0.77107e-3,0.749766e-3,0.477124e-3,0.703636e-3,0.631553e-3,0.725323e-3,0.35517e-3]
poz6= [[0.466453e-3,-0.489653e-3,-0.289565e-3],[-0.417447e-3,0.580122e-3,0.0739795e-3],[-0.0882266e-3,0.644594e-3,1.26788e-3],[-0.21726e-3,-0.284453e-3,-0.710367e-3],[-0.32347e-3,0.0780686e-3,-0.407172e-3],[0.115135e-3,0.833306e-3,1.59296e-3],[0.219957e-3,0.0500425e-3,0.310294e-3],[0.370829e-3,-0.822612e-3,-1.05577e-3],[-0.00216129e-3,0.34995e-3,0.783467e-3],[-0.191474e-3,-0.946057e-3,-1.13576e-3]]
template6= []
template6.append(clumpTemplate(relRadii=radz6,relPositions=poz6))

radz7= [0.442256e-3,0.66605e-3,0.647523e-3,0.847105e-3,0.517318e-3,0.692936e-3,0.603694e-3,0.8266e-3,0.815378e-3,0.467486e-3]
poz7= [[0.994838e-3,-0.212728e-3,-0.193128e-3],[0.0171947e-3,0.442008e-3,-0.839524e-3],[-0.112928e-3,0.638662e-3,0.186529e-3],[-0.181769e-3,0.467764e-3,-0.0130999e-3],[0.102407e-3,-1.09671e-3,0.751994e-3],[0.556214e-3,0.0319631e-3,0.329544e-3],[-0.356862e-3,-0.562961e-3,0.260524e-3],[0.304484e-3,-0.190831e-3,0.265553e-3],[-0.331025e-3,0.115129e-3,-0.221368e-3],[-0.838012e-3,-0.468742e-3,-0.143521e-3]]
template7= []
template7.append(clumpTemplate(relRadii=radz7,relPositions=poz7))

radz8= [1.08571e-3,1.02884e-3,0.735509e-3,0.69468e-3,0.911815e-3,0.668582e-3,0.562909e-3,0.632204e-3,0.899746e-3,1.00872e-3]
poz8= [[0.195184e-3,0.0518254e-3,-0.217815e-3],[0.305177e-3,-0.636014e-3,-0.183981e-3],[-0.642687e-3,0.0255572e-3,0.627559e-3],[0.932847e-3,-0.217715e-3,0.0500083e-3],[-0.269066e-3,-0.946024e-3,0.0576525e-3],[-0.845184e-3,0.886446e-3,0.5363e-3],[0.824509e-3,-0.940474e-3,0.3599e-3],[-0.6691e-3,1.24516e-3,-0.0039974e-3],[0.0602271e-3,0.976859e-3,-0.0917182e-3],[0.378693e-3,-0.354913e-3,-0.324608e-3]]
template8= []
template8.append(clumpTemplate(relRadii=radz8,relPositions=poz8))

radz9= [0.474032e-3,0.556242e-3,0.352943e-3,0.52707e-3,0.54501e-3,0.489357e-3,0.245724e-3,0.414103e-3,0.168328e-3,0.424569e-3]
poz9= [[-0.149359e-3,0.430738e-3,0.0336149e-3],[0.0235595e-3,-0.116338e-3,-0.642278e-3],[-0.110129e-3,-0.266116e-3,0.953922e-3],[0.0346106e-3,0.024943e-3,0.4669e-3],[0.164038e-3,-0.351662e-3,-0.27522e-3],[-0.0793631e-3,0.360648e-3,0.656228e-3],[-0.394234e-3,0.792146e-3,0.429234e-3],[0.147085e-3,-0.558383e-3,0.283511e-3],[0.557863e-3,-0.449865e-3,-0.484787e-3],[-0.116554e-3,0.265996e-3,-0.855991e-3]]
template9= []
template9.append(clumpTemplate(relRadii=radz9,relPositions=poz9))

radz10= [0.950557e-3,0.809924e-3,0.609205e-3,0.584892e-3,1.17361e-3,0.67549e-3,0.713892e-3,0.621384e-3,0.91065e-3,0.567094e-3]
poz10= [[-0.220529e-3,0.0531455e-3,-0.575899e-3],[0.271015e-3,0.044857e-3,0.674729e-3],[0.814208e-3,-0.0210867e-3,0.525876e-3],[-0.454229e-3,1.72177e-3,0.884366e-3],[0.0570115e-3,-0.619134e-3,-0.349575e-3],[-0.235854e-3,0.903258e-3,0.788177e-3],[-0.224188e-3,1.51989e-3,0.312034e-3],[-0.358229e-3,-1.42984e-3,-0.196095e-3],[0.477847e-3,-0.218496e-3,0.0275049e-3],[0.027233e-3,0.223609e-3,1.17564e-3]]
template10= []
template10.append(clumpTemplate(relRadii=radz10,relPositions=poz10))

radz11= [0.485631e-3,0.375966e-3,0.314751e-3,0.345002e-3,0.418114e-3,0.339587e-3,0.358372e-3,0.483134e-3,0.544727e-3,0.41188e-3]
poz11= [[-0.0737463e-3,-0.109803e-3,0.531986e-3],[0.406419e-3,0.150939e-3,0.516359e-3],[0.166066e-3,0.536409e-3,-0.690492e-3],[-0.281539e-3,-0.483846e-3,-0.490017e-3],[0.433496e-3,0.488534e-3,-0.510506e-3],[0.0532658e-3,-0.287702e-3,-0.543564e-3],[-0.711368e-3,-0.25631e-3,0.493543e-3],[0.291012e-3,0.275202e-3,0.074338e-3],[0.0532335e-3,-0.0177433e-3,-0.230648e-3],[-0.455572e-3,-0.370233e-3,-0.0489155e-3]]
template11= []
template11.append(clumpTemplate(relRadii=radz11,relPositions=poz11))

radz12= [0.447918e-3,0.631558e-3,0.432997e-3,0.354383e-3,0.644684e-3,0.501349e-3,0.419795e-3,0.305748e-3,0.401928e-3,0.301956e-3]
poz12= [[-0.327852e-3,0.13963e-3,0.0854213e-3],[-0.00642485e-3,0.0540226e-3,0.130283e-3],[-0.0784524e-3,0.131143e-3,0.507045e-3],[0.266248e-3,-0.210016e-3,-0.630071e-3],[-0.0142571e-3,-0.106791e-3,-0.16405e-3],[0.221276e-3,0.213503e-3,0.309049e-3],[0.2366e-3,-0.0271234e-3,-0.29612e-3],[-0.55599e-3,-0.0426141e-3,-0.214846e-3],[0.214827e-3,0.265521e-3,0.442681e-3],[0.376437e-3,0.0275707e-3,0.181478e-3]]
template12= []
template12.append(clumpTemplate(relRadii=radz12,relPositions=poz12))

radz13= [1.19962e-3,0.743741e-3,0.709207e-3,0.965517e-3,0.60486e-3,0.387556e-3,0.917305e-3,0.536962e-3,0.973916e-3,0.63234e-3]
poz13= [[0.192005e-3,-0.155905e-3,-0.122618e-3],[-0.682503e-3,-0.0149607e-3,-0.278916e-3],[0.897107e-3,-0.803443e-3,-0.857631e-3],[-0.872268e-3,0.201405e-3,0.455245e-3],[1.07107e-3,0.349568e-3,-0.239255e-3],[-0.424582e-3,-0.0887744e-3,-1.26494e-3],[-0.254935e-3,0.646606e-3,0.511555e-3],[0.66312e-3,1.05125e-3,0.519971e-3],[0.0143351e-3,-0.188949e-3,0.444358e-3],[0.181922e-3,-0.562342e-3,-1.15348e-3]]
template13= []
template13.append(clumpTemplate(relRadii=radz13,relPositions=poz13))

radz14= [0.792554e-3,0.518466e-3,0.584126e-3,0.441638e-3,0.525031e-3,0.700709e-3,0.843464e-3,0.535991e-3,0.706061e-3,0.446846e-3]
poz14= [[-0.00384768e-3,-0.443285e-3,-0.487315e-3],[0.438926e-3,0.371983e-3,0.783448e-3],[0.415183e-3,-0.695797e-3,-0.174922e-3],[-0.881609e-3,-0.254874e-3,-0.157516e-3],[0.107576e-3,0.598183e-3,-0.357805e-3],[0.138216e-3,0.742437e-3,0.393866e-3],[-0.0669773e-3,0.08188e-3,0.237945e-3],[0.329639e-3,-0.437353e-3,0.0127984e-3],[-0.407467e-3,-0.296901e-3,-0.115376e-3],[-0.471792e-3,-0.0394793e-3,-0.429514e-3]]
template14= []
template14.append(clumpTemplate(relRadii=radz14,relPositions=poz14))

radz15= [0.775848e-3,0.584279e-3,0.668262e-3,0.61443e-3,0.460187e-3,0.549898e-3,0.612284e-3,0.542132e-3,0.508751e-3,0.678911e-3]
poz15= [[-0.0743132e-3,0.0276939e-3,-0.45502e-3],[-0.05889e-3,0.088381e-3,-1.11084e-3],[0.742944e-3,-0.160426e-3,0.201365e-3],[-0.65782e-3,0.233331e-3,0.0525642e-3],[1.21831e-3,-0.068659e-3,0.793404e-3],[-0.0987565e-3,0.0927862e-3,0.726579e-3],[0.617738e-3,-0.320369e-3,1.04944e-3],[-0.84565e-3,0.131561e-3,-0.683602e-3],[-1.36315e-3,0.485127e-3,-0.324054e-3],[0.248369e-3,-0.246552e-3,-0.19788e-3]]
template15= []
template15.append(clumpTemplate(relRadii=radz15,relPositions=poz15))

radz16= [0.47463e-3,0.451384e-3,0.202346e-3,0.430663e-3,0.371859e-3,0.291715e-3,0.206762e-3,0.373219e-3,0.302163e-3,0.308742e-3]
poz16= [[-0.0815721e-3,0.0345598e-3,-0.0297553e-3],[-0.109923e-3,-0.245061e-3,0.148004e-3],[0.180629e-3,-0.569389e-3,0.330228e-3],[-0.351597e-3,-0.00683516e-3,0.234181e-3],[0.0294935e-3,-0.562437e-3,-0.0900278e-3],[0.17446e-3,-0.126997e-3,-0.392354e-3],[0.255047e-3,-0.642209e-3,-0.346875e-3],[0.37281e-3,0.261175e-3,-0.348097e-3],[0.00575695e-3,0.586845e-3,0.301381e-3],[0.237857e-3,0.603677e-3,0.0993574e-3]]
template16= []
template16.append(clumpTemplate(relRadii=radz16,relPositions=poz16))

radz17= [0.662254e-3,0.502369e-3,0.778736e-3,0.759936e-3,0.438364e-3,0.430566e-3,0.848942e-3,0.697163e-3,0.902474e-3,0.617969e-3]
poz17=[[-0.732356e-3,-0.112722e-3,-0.0770465e-3],[-0.489058e-3,-0.89685e-3,0.788351e-3],[0.0189893e-3,-0.0297078e-3,0.202501e-3],[0.154887e-3,-0.74001e-3,0.554927e-3],[0.60344e-3,-0.450512e-3,0.75768e-3],[1.15019e-3,0.794547e-3,-0.909666e-3],[0.103153e-3,0.532892e-3,-0.272996e-3],[0.769852e-3,0.195611e-3,0.123153e-3],[-0.247705e-3,0.766236e-3,-0.734837e-3],[-0.0250627e-3,-1.65251e-3,1.10399e-3]]
template17= []
template17.append(clumpTemplate(relRadii=radz17,relPositions=poz17))

radz18= [0.553536e-3,0.411659e-3,0.374677e-3,0.199058e-3,0.184954e-3,0.566202e-3,0.330291e-3,0.42025e-3,0.352253e-3,0.557426e-3]
poz18= [[0.11275e-3,-0.0937356e-3,0.250268e-3],[0.37917e-3,-0.645871e-3,0.191479e-3],[-0.372486e-3,0.191716e-3,0.502774e-3],[0.398232e-3,0.164662e-3,-0.863727e-3],[0.122454e-3,0.327752e-3,-1.01101e-3],[-0.31092e-3,0.294616e-3,-0.233151e-3],[0.300324e-3,-0.723783e-3,0.834036e-3],[-0.176953e-3,0.512353e-3,-0.70335e-3],[-0.0701683e-3,-0.151907e-3,0.737305e-3],[0.155138e-3,0.00530851e-3,-0.29338e-3]]
template18= []
template18.append(clumpTemplate(relRadii=radz18,relPositions=poz18))

radz19= [0.575494e-3,0.295276e-3,0.499607e-3,0.638223e-3,0.366957e-3,0.694926e-3,0.753987e-3,0.384853e-3,0.416639e-3,0.434463e-3]
poz19= [[-0.402566e-3,0.441424e-3,-0.214032e-3],[0.0443079e-3,-0.694845e-3,0.710401e-3],[-0.0127985e-3,0.352946e-3,0.265701e-3],[-0.537425e-3,-0.244026e-3,-0.0873079e-3],[0.553549e-3,0.443502e-3,0.422832e-3],[0.520204e-3,-0.109919e-3,0.114611e-3],[0.30008e-3,-0.271335e-3,0.141052e-3],[-0.00682294e-3,0.810329e-3,-0.424971e-3],[-1.00122e-3,0.0988265e-3,-0.261373e-3],[0.501906e-3,0.371891e-3,-0.367093e-3]]
template19= []
template19.append(clumpTemplate(relRadii=radz19,relPositions=poz19))

radz20= [0.517041e-3,0.692223e-3,0.689605e-3,0.59365e-3,0.647237e-3,0.697283e-3,0.832682e-3,0.49128e-3,0.593112e-3,0.727718e-3]
poz20= [[1.09062e-3,-0.337623e-3,0.523769e-3],[0.320434e-3,0.561817e-3,0.533833e-3],[0.902587e-3,0.158702e-3,0.497778e-3],[0.533289e-3,-0.209294e-3,0.0732016e-3],[-0.480886e-3,0.484284e-3,0.400412e-3],[-0.312662e-3,-0.253871e-3,-0.618042e-3],[-0.13165e-3,-0.226925e-3,-0.273867e-3],[0.76896e-3,0.0227444e-3,-0.147841e-3],[-0.760559e-3,-0.644699e-3,-0.816148e-3],[-0.762633e-3,-0.175881e-3,-0.448454e-3]]
template20= []
template20.append(clumpTemplate(relRadii=radz20,relPositions=poz20))

radz21= [0.590227e-3,0.586582e-3,0.558457e-3,0.554132e-3,0.41899e-3,0.766309e-3,0.577322e-3,0.453669e-3,0.514723e-3,0.62871e-3]
poz21= [[-0.67795e-3,-0.219142e-3,-0.145785e-3],[0.792854e-3,-0.213433e-3,0.450304e-3],[-0.713133e-3,0.123162e-3,0.494255e-3],[0.30358e-3,-0.325326e-3,-0.483987e-3],[0.792192e-3,0.50833e-3,0.638925e-3],[0.179559e-3,0.0421156e-3,0.269559e-3],[-0.330454e-3,0.275791e-3,-0.242788e-3],[-0.136836e-3,0.603264e-3,-0.77898e-3],[-0.338826e-3,-0.438424e-3,0.189593e-3],[-0.0422446e-3,0.0261795e-3,-0.742992e-3]]
template21= []
template21.append(clumpTemplate(relRadii=radz21,relPositions=poz21))

radz22= [1.08158e-3,0.67492e-3,0.734631e-3,0.908811e-3,0.777984e-3,0.772374e-3,0.859311e-3,0.490369e-3,0.452161e-3,0.800521e-3]
poz22= [[0.21638e-3,-0.0877246e-3,0.360517e-3],[0.359124e-3,-0.698507e-3,0.853354e-3],[0.0653886e-3,0.706773e-3,0.0570797e-3],[-0.121592e-3,-0.212497e-3,-1.05531e-3],[-0.167517e-3,0.531067e-3,-0.959187e-3],[-0.590533e-3,0.305653e-3,0.623546e-3],[0.186093e-3,-0.391875e-3,-0.850302e-3],[0.330873e-3,1.06639e-3,0.623365e-3],[-0.147345e-3,0.581741e-3,1.13362e-3],[-0.232106e-3,-0.386564e-3,1.06188e-3]]
template22= []
template22.append(clumpTemplate(relRadii=radz22,relPositions=poz22))

radz23= [0.919619e-3,0.84559e-3,0.639085e-3,0.717697e-3,1.16838e-3,0.712194e-3,0.6532e-3,0.660533e-3,0.765353e-3,1.06596e-3]
poz23= [[-0.447017e-3,0.547581e-3,0.632738e-3],[-0.532947e-3,0.724029e-3,-0.200529e-3],[0.342803e-3,-0.164855e-3,-1.13613e-3],[-0.50057e-3,-0.708132e-3,-1.64085e-3],[-0.116202e-3,-0.166196e-3,-0.527028e-3],[-1.05321e-3,-0.0730579e-3,-0.115616e-3],[-0.742086e-3,-0.70303e-3,-1.10772e-3],[0.720381e-3,-0.939116e-3,0.0760638e-3],[0.546328e-3,0.547036e-3,1.43315e-3],[0.699012e-3,-0.0481445e-3,0.580196e-3]]
template23= []
template23.append(clumpTemplate(relRadii=radz23,relPositions=poz23))

radz24= [0.724891e-3,0.463056e-3,0.55813e-3,0.420202e-3,0.713178e-3,0.859416e-3,0.77958e-3,0.651193e-3,0.653488e-3,0.455481e-3]
poz24= [[-0.623002e-3,0.659417e-3,-0.089624e-3],[0.132513e-3,1.37684e-3,0.0257306e-3],[0.616906e-3,0.77666e-3,0.209375e-3],[0.976654e-3,1.6376e-3,0.0224034e-3],[-1.10501e-3,-0.526421e-3,0.0898894e-3],[0.153605e-3,-0.0639722e-3,0.169963e-3],[-0.676795e-3,-0.61327e-3,-0.057729e-3],[1.17237e-3,-0.276502e-3,-0.139889e-3],[-0.109644e-3,-0.814102e-3,-0.223965e-3],[1.65505e-3,-0.805105e-3,-0.468977e-3]]
template24= []
template24.append(clumpTemplate(relRadii=radz24,relPositions=poz24))

radz25= [0.234683e-3,0.510489e-3,0.522322e-3,0.60645e-3,0.57481e-3,0.364789e-3,0.400625e-3,0.273384e-3,0.503151e-3,0.286622e-3]
poz25= [[-0.209645e-3,-0.0775952e-3,0.623745e-3],[-0.421371e-3,0.0613003e-3,0.228885e-3],[0.129573e-3,0.430089e-3,0.101318e-3],[-0.0294701e-3,-0.0762707e-3,0.0429069e-3],[0.223984e-3,-0.187506e-3,-0.0907003e-3],[0.577356e-3,0.22629e-3,0.133488e-3],[-0.486653e-3,-0.274875e-3,-0.0789445e-3],[0.591845e-3,0.426634e-3,0.496953e-3],[-0.125242e-3,-0.424597e-3,-0.452945e-3],[0.145724e-3,0.930564e-3,0.259368e-3]]
template25= []
template25.append(clumpTemplate(relRadii=radz25,relPositions=poz25))

radz26= [0.796721e-3,0.727834e-3,0.834063e-3,0.970789e-3,0.448575e-3,0.495131e-3,0.559952e-3,0.621369e-3,0.736207e-3,0.701114e-3]
poz26= [[-0.594612e-3,0.0508816e-3,0.0646042e-3],[-0.598868e-3,-0.534035e-3,-0.402705e-3],[-0.213214e-3,-0.369979e-3,-0.481091e-3],[0.340394e-3,-0.0586152e-3,0.0326873e-3],[0.840076e-3,-1.26035e-3,0.0575395e-3],[0.818781e-3,-0.924341e-3,0.338066e-3],[-0.595807e-3,0.926449e-3,0.647699e-3],[-0.00350954e-3,1.1348e-3,0.298341e-3],[0.289531e-3,0.601822e-3,0.19807e-3],[0.321605e-3,-0.481588e-3,-0.428343e-3]]
template26= []
template26.append(clumpTemplate(relRadii=radz26,relPositions=poz26))

radz27= [0.46615e-3,0.62347e-3,0.624347e-3,0.476958e-3,0.381368e-3,0.665959e-3,0.344162e-3,0.485312e-3,0.317436e-3,0.630393e-3]
poz27= [[0.616128e-3,0.707117e-3,-0.00233055e-3],[-0.284092e-3,-0.725765e-3,0.464314e-3],[-0.398852e-3,-0.198659e-3,-0.0606472e-3],[-0.451276e-3,-1.09996e-3,0.307875e-3],[0.505707e-3,1.18103e-3,-0.711811e-3],[0.216961e-3,-0.0909827e-3,0.326096e-3],[-0.402414e-3,0.309846e-3,-0.574329e-3],[-0.819883e-3,-0.644815e-3,0.214159e-3],[0.821773e-3,1.38613e-3,-0.190717e-3],[0.238765e-3,0.524666e-3,-0.556963e-3]]
template27= []
template27.append(clumpTemplate(relRadii=radz27,relPositions=poz27))

radz28= [0.708714e-3,0.676356e-3,1.15592e-3,0.865863e-3,0.818324e-3,0.82329e-3,0.939803e-3,0.602003e-3,0.534899e-3,0.547595e-3]
poz28= [[-0.72741e-3,0.827016e-3,0.187309e-3],[-0.932564e-3,0.299408e-3,-0.52447e-3],[-0.101959e-3,0.300003e-3,0.382497e-3],[0.735876e-3,-0.27801e-3,-0.222859e-3],[0.985758e-3,0.378382e-3,0.777302e-3],[0.248927e-3,0.72048e-3,1.45402e-3],[-0.464401e-3,-0.550488e-3,-0.79471e-3],[0.190885e-3,-0.908986e-3,-1.19169e-3],[-0.151716e-3,-1.39605e-3,-1.68075e-3],[-0.868427e-3,-1.23638e-3,-1.72815e-3]]
template28= []
template28.append(clumpTemplate(relRadii=radz28,relPositions=poz28))

radz29= [0.735391e-3,0.514581e-3,0.950579e-3,0.973974e-3,0.642415e-3,0.723981e-3,0.490876e-3,0.503451e-3,0.82493e-3,0.680583e-3]
poz29= [[-0.759223e-3,1.09366e-3,1.02975e-3],[-0.607303e-3,1.93423e-3,1.13615e-3],[-0.132465e-3,-0.264808e-3,0.622818e-3],[-0.49886e-3,0.418846e-3,0.813836e-3],[0.507471e-3,-1.16548e-3,-0.94828e-3],[0.189089e-3,-0.915259e-3,-0.0235768e-3],[0.168606e-3,0.481089e-3,-1.61708e-3],[0.248163e-3,0.537741e-3,-0.550508e-3],[0.661714e-3,-0.354541e-3,-1.53957e-3],[0.418381e-3,-0.0380044e-3,-0.0315876e-3]]
template29= []
template29.append(clumpTemplate(relRadii=radz29,relPositions=poz29))

radz30= [0.700592e-3,0.744244e-3,0.880236e-3,0.979073e-3,0.515177e-3,0.853976e-3,0.724691e-3,0.598255e-3,0.443982e-3,0.418323e-3]
poz30= [[0.848456e-3,0.251917e-3,-0.130259e-3],[-0.59311e-3,-0.616217e-3,-0.299839e-3],[0.264064e-3,0.0101059e-3,0.370961e-3],[-0.149363e-3,-0.0120494e-3,0.314375e-3],[-0.199826e-3,-0.497763e-3,0.824076e-3],[0.337964e-3,0.33154e-3,-0.459061e-3],[0.0923313e-3,0.750531e-3,0.100963e-3],[0.118141e-3,-0.386938e-3,0.693516e-3],[-0.897727e-3,-1.11515e-3,-0.292925e-3],[-0.983805e-3,-0.973e-3,-0.870565e-3]]
template30= []
template30.append(clumpTemplate(relRadii=radz30,relPositions=poz30))

radz31= [0.658203e-3,0.401059e-3,0.669964e-3,0.65091e-3,0.644532e-3,0.611934e-3,0.365638e-3,0.722027e-3,0.473421e-3,0.533721e-3]
poz31= [[-0.179519e-3,-0.610598e-3,-0.059046e-3],[-1.02206e-3,0.353298e-3,-0.456254e-3],[0.606977e-3,0.178652e-3,0.0213271e-3],[0.0522236e-3,-0.305794e-3,0.0747355e-3],[-0.74755e-3,0.117458e-3,-0.0959453e-3],[0.735056e-3,-0.0160144e-3,0.403372e-3],[0.0936953e-3,1.04363e-3,-0.0367055e-3],[-0.24246e-3,0.378336e-3,-0.0525468e-3],[0.664221e-3,0.710556e-3,-0.142315e-3],[-0.11263e-3,-1.10641e-3,-0.0409657e-3]]
template31= []
template31.append(clumpTemplate(relRadii=radz31,relPositions=poz31))

radz32= [0.508506e-3,0.439253e-3,0.314058e-3,0.343266e-3,0.272229e-3,0.541356e-3,0.416917e-3,0.453974e-3,0.547694e-3,0.277628e-3]
poz32= [[-0.225357e-3,0.14037e-3,0.00688545e-3],[0.332553e-3,0.0664006e-3,-0.201017e-3],[0.871473e-3,0.659333e-3,0.662196e-3],[1.02387e-3,-0.234181e-3,0.666236e-3],[0.579073e-3,0.466995e-3,0.755369e-3],[0.61363e-3,0.200543e-3,0.396658e-3],[0.221237e-3,0.262066e-3,0.629518e-3],[-0.189529e-3,-0.132137e-3,-0.686674e-3],[-0.79969e-3,-0.365314e-3,-0.338817e-3],[-1.11538e-3,-0.654939e-3,-0.429339e-3]]
template32= []
template32.append(clumpTemplate(relRadii=radz32,relPositions=poz32))

radz33= [0.420505e-3,0.407871e-3,0.450595e-3,0.576866e-3,0.367332e-3,0.385205e-3,0.686092e-3,0.784775e-3,0.83901e-3,0.502668e-3]
poz33= [[0.0691127e-3,1.28236e-3,-0.545409e-3],[1.00331e-3,-0.972655e-3,1.01178e-3],[0.210023e-3,-0.954485e-3,0.431621e-3],[0.35574e-3,-0.0565741e-3,0.44141e-3],[-0.937173e-3,2.07539e-3,-0.312381e-3],[-0.508312e-3,-0.392628e-3,-0.473531e-3],[0.626895e-3,-0.809716e-3,0.501009e-3],[-0.382687e-3,0.303552e-3,-0.250385e-3],[0.0022206e-3,-0.389053e-3,-0.0665775e-3],[-0.444704e-3,1.3972e-3,-0.373818e-3]]
template33= []
template33.append(clumpTemplate(relRadii=radz33,relPositions=poz33))

radz34= [0.466058e-3,0.372447e-3,0.720212e-3,0.324833e-3,0.46166e-3,0.654142e-3,0.608733e-3,0.528596e-3,0.270448e-3,0.338444e-3]
poz34= [[0.197587e-3,-0.494699e-3,-0.514853e-3],[-0.650098e-3,-0.532914e-3,0.348444e-3],[0.137578e-3,0.452782e-3,0.0547378e-3],[-0.644546e-3,-1.03558e-3,0.020076e-3],[-0.230844e-3,-0.800606e-3,-0.28509e-3],[-0.0727215e-3,0.0219704e-3,0.0872163e-3],[0.44194e-3,0.119724e-3,-0.165534e-3],[-0.0765661e-3,0.548543e-3,0.330343e-3],[-0.499922e-3,0.689228e-3,0.707493e-3],[-0.476646e-3,0.046057e-3,0.55167e-3]]
template34= []
template34.append(clumpTemplate(relRadii=radz34,relPositions=poz34))

radz35= [0.261295e-3,0.271848e-3,0.343529e-3,0.590178e-3,0.552816e-3,0.419458e-3,0.430604e-3,0.409298e-3,0.57923e-3,0.62408e-3]
poz35=[[-0.0973628e-3,0.022201e-3,-0.985132e-3],[0.248443e-3,-1.1658e-3,0.355023e-3],[0.148459e-3,-0.0671066e-3,0.860869e-3],[0.248599e-3,-0.653922e-3,0.0865824e-3],[-0.208991e-3,0.409364e-3,-0.493697e-3],[-0.0103015e-3,-0.176366e-3,-0.421231e-3],[-0.166426e-3,0.398179e-3,0.594653e-3],[-0.365486e-3,0.013932e-3,-0.106153e-3],[-0.0795369e-3,0.596559e-3,-0.136148e-3],[0.0471449e-3,-0.14099e-3,0.170868e-3]]
template35= []
template35.append(clumpTemplate(relRadii=radz35,relPositions=poz35))

radz36= [0.582179e-3,0.368651e-3,0.497255e-3,0.489581e-3,0.419668e-3,0.511204e-3,0.431919e-3,0.58377e-3,0.567242e-3,0.45198e-3]
poz36= [[-0.0790762e-3,0.250985e-3,0.0671392e-3],[0.311811e-3,0.48454e-3,-0.360566e-3],[0.0489163e-3,0.4245e-3,-0.0784197e-3],[0.308942e-3,0.0790453e-3,-0.723533e-3],[0.139723e-3,-0.466085e-3,0.581514e-3],[0.0172958e-3,0.0170304e-3,-0.633885e-3],[-0.21198e-3,0.50553e-3,0.0790329e-3],[-0.0264222e-3,-0.113961e-3,0.429507e-3],[-0.0450503e-3,-0.30176e-3,0.592367e-3],[-0.276047e-3,-0.442841e-3,0.120733e-3]]
template36= []
template36.append(clumpTemplate(relRadii=radz36,relPositions=poz36))

radz37= [0.890405e-3,1.07266e-3,0.61052e-3,1.02801e-3,0.657614e-3,1.07708e-3,0.91963e-3,0.829164e-3,0.553572e-3,0.647746e-3]
poz37= [[0.589379e-3,0.0908589e-3,-0.435123e-3],[0.107525e-3,0.78182e-3,-0.0693016e-3],[-1.14701e-3,-1.66471e-3,-0.0739903e-3],[-0.757724e-3,-0.632409e-3,0.387479e-3],[0.895092e-3,-0.391931e-3,-0.788334e-3],[-0.346514e-3,-0.016122e-3,0.359399e-3],[0.732753e-3,1.08162e-3,-0.397608e-3],[0.141472e-3,-1.28236e-3,-0.469168e-3],[0.36152e-3,1.38717e-3,1.11581e-3],[0.745467e-3,1.40559e-3,0.606745e-3]]
template37= []
template37.append(clumpTemplate(relRadii=radz37,relPositions=poz37))

radz38= [0.491309e-3,0.742495e-3,0.644085e-3,0.545226e-3,0.641825e-3,0.815384e-3,0.396434e-3,0.649868e-3,0.658909e-3,0.542051e-3]
poz38= [[0.400075e-3,-0.383135e-3,0.772279e-3],[0.580502e-3,0.363606e-3,-0.0237493e-3],[-0.113982e-3,-0.503453e-3,0.29516e-3],[0.728911e-3,0.138239e-3,0.340479e-3],[0.600572e-3,0.704211e-3,-0.0272732e-3],[0.265144e-3,-0.075436e-3,0.0768567e-3],[-0.654622e-3,-0.787846e-3,0.2925e-3],[-0.0725232e-3,0.277007e-3,-0.347429e-3],[-0.739203e-3,-0.260899e-3,-0.21123e-3],[-1.1515e-3,0.0737425e-3,-0.410929e-3]]
template38= []
template38.append(clumpTemplate(relRadii=radz38,relPositions=poz38))

radz39= [0.359834e-3,0.530773e-3,0.583062e-3,0.476811e-3,0.374002e-3,0.368972e-3,0.593545e-3,0.321237e-3,0.517554e-3,0.356211e-3]
poz39= [[0.42399e-3,0.424753e-3,-0.709771e-3],[-0.0721177e-3,-0.468148e-3,-0.280307e-3],[0.309822e-3,0.0168143e-3,-0.347436e-3],[0.288886e-3,0.511911e-3,-0.0935452e-3],[-0.352334e-3,-0.808115e-3,0.0309499e-3],[0.0416277e-3,-0.0566004e-3,-0.695052e-3],[-0.0196803e-3,0.352839e-3,0.180835e-3],[-0.372859e-3,-0.104829e-3,0.919169e-3],[-0.27891e-3,-0.232204e-3,0.328406e-3],[-0.219949e-3,0.364579e-3,0.841112e-3]]
template39= []
template39.append(clumpTemplate(relRadii=radz39,relPositions=poz39))

radz40= [0.599317e-3,0.486089e-3,0.481116e-3,0.445282e-3,0.648828e-3,0.533797e-3,0.764182e-3,0.648313e-3,0.836475e-3,0.67675e-3]
poz40= [[0.465454e-3,0.154532e-3,-0.579118e-3],[-0.923187e-3,-0.0772535e-3,0.247005e-3],[0.453854e-3,-0.111681e-3,-1.052e-3],[-0.910635e-3,0.0620831e-3,-0.373003e-3],[-0.104829e-3,-0.0854138e-3,-0.658055e-3],[0.713564e-3,-0.0807398e-3,0.30525e-3],[0.126407e-3,0.0115061e-3,0.444523e-3],[-0.511025e-3,-0.0717356e-3,0.123784e-3],[0.235555e-3,-0.0156299e-3,-0.0893039e-3],[-0.115195e-3,0.162566e-3,0.796855e-3]]
template40= []
template40.append(clumpTemplate(relRadii=radz40,relPositions=poz40))

radz41= [0.378217e-3,0.451608e-3,0.431657e-3,0.322301e-3,0.302799e-3,0.492177e-3,0.313158e-3,0.367392e-3,0.603202e-3,0.62022e-3]
poz41= [[-0.0534197e-3,0.619218e-3,-0.00363671e-3],[0.395151e-3,-0.146426e-3,-0.173706e-3],[-0.347498e-3,0.297803e-3,0.322893e-3],[-0.69953e-3,-0.0145739e-3,-0.0554216e-3],[-0.743265e-3,0.155595e-3,0.366392e-3],[0.122362e-3,-0.297367e-3,-0.580563e-3],[0.653137e-3,0.153491e-3,0.723984e-3],[0.101437e-3,0.178787e-3,0.536415e-3],[-0.058057e-3,-0.125744e-3,-0.239142e-3],[0.0992581e-3,-0.0542699e-3,0.156454e-3]]
template41= []
template41.append(clumpTemplate(relRadii=radz41,relPositions=poz41))

radz42= [1.06732e-3,0.781565e-3,0.686023e-3,0.812029e-3,0.793583e-3,1.11254e-3,0.674382e-3,0.494318e-3,0.946799e-3,0.484813e-3]
poz42= [[0.254003e-3,-0.786633e-3,-0.211791e-3],[-0.728852e-3,0.437008e-3,0.694896e-3],[-0.581853e-3,-1.06433e-3,0.331281e-3],[0.261617e-3,0.0210057e-3,-0.653835e-3],[-0.779946e-3,1.35431e-3,0.837871e-3],[0.134529e-3,0.115643e-3,0.114372e-3],[0.602067e-3,-0.933056e-3,-1.31061e-3],[1.06388e-3,-1.6791e-3,-1.37165e-3],[0.00236134e-3,1.1421e-3,0.132235e-3],[-0.266792e-3,-1.74493e-3,-0.0489625e-3]]
template42= []
template42.append(clumpTemplate(relRadii=radz42,relPositions=poz42))

radz43= [0.767746e-3,0.614688e-3,1.10545e-3,0.556376e-3,0.9544e-3,0.688723e-3,0.754229e-3,0.77449e-3,0.557985e-3,0.921618e-3]
poz43= [[0.129521e-3,0.581819e-3,0.924795e-3],[-0.594702e-3,-1.34336e-3,-0.696867e-3],[-0.234693e-3,-0.426934e-3,-0.30779e-3],[-1.27654e-3,-0.965853e-3,-0.377827e-3],[0.480675e-3,-0.21088e-3,0.361013e-3],[0.908607e-3,-0.996036e-3,0.385485e-3],[0.253165e-3,-1.20347e-3,-0.217332e-3],[-0.192899e-3,0.572781e-3,-0.537798e-3],[-0.475807e-3,1.3319e-3,-0.595488e-3],[0.0246646e-3,1.33407e-3,0.239359e-3]]
template43= []
template43.append(clumpTemplate(relRadii=radz43,relPositions=poz43))

radz44= [0.304305e-3,0.333143e-3,0.359223e-3,0.266537e-3,0.345835e-3,0.589168e-3,0.312871e-3,0.479508e-3,0.373647e-3,0.615089e-3]
poz44= [[-0.0890751e-3,-0.162128e-3,-0.760056e-3],[0.617235e-3,0.206315e-3,0.336856e-3],[-0.522133e-3,0.164827e-3,0.317081e-3],[-0.105907e-3,-0.42044e-3,-0.677669e-3],[0.523754e-3,0.113196e-3,0.0162152e-3],[-0.117281e-3,0.131442e-3,0.108169e-3],[-0.253508e-3,-0.301224e-3,-0.233114e-3],[0.0797448e-3,-0.183666e-3,-0.357972e-3],[-0.367626e-3,-0.226122e-3,0.257412e-3],[0.054972e-3,0.0369335e-3,0.0973996e-3]]
template44= []
template44.append(clumpTemplate(relRadii=radz44,relPositions=poz44))

radz45= [0.226757e-3,0.216405e-3,0.28101e-3,0.245497e-3,0.154234e-3,0.240166e-3,0.237921e-3,0.154746e-3,0.291792e-3,0.27294e-3]
poz45= [[0.402344e-3,-0.0841258e-3,0.461284e-3],[0.206209e-3,0.1023e-3,0.350438e-3],[-0.0598901e-3,0.12008e-3,0.0908156e-3],[0.163884e-3,-0.271321e-3,-0.210889e-3],[0.2498e-3,-0.217776e-3,0.628158e-3],[-0.421901e-3,0.134518e-3,-0.461643e-3],[-0.357091e-3,0.368247e-3,-0.019797e-3],[0.361465e-3,-0.341662e-3,-0.0512651e-3],[0.268278e-3,-0.181575e-3,0.176154e-3],[-0.176445e-3,-0.0212191e-3,-0.274002e-3]]
template45= []
template45.append(clumpTemplate(relRadii=radz45,relPositions=poz45))

radz46= [0.59094e-3,0.606141e-3,0.841645e-3,0.513544e-3,0.966721e-3,0.474306e-3,0.817125e-3,0.679896e-3,0.60137e-3,0.73914e-3]
poz46= [[-0.988543e-3,-0.02381e-3,-0.0696416e-3],[-1.18656e-3,0.358422e-3,0.747811e-3],[1.6633e-3,-0.301745e-3,-0.482467e-3],[2.47533e-3,-0.130384e-3,-0.876967e-3],[0.77729e-3,-0.151484e-3,-0.287438e-3],[0.161279e-3,-0.929995e-3,-0.441948e-3],[-0.0594468e-3,-0.0457946e-3,-0.213619e-3],[-0.116549e-3,0.195388e-3,0.35082e-3],[-2.17388e-3,0.852109e-3,1.21114e-3],[-1.97556e-3,0.107046e-3,0.509666e-3]]
template46= []
template46.append(clumpTemplate(relRadii=radz46,relPositions=poz46))

radz47= [1.18767e-3,1.01405e-3,0.680608e-3,0.552456e-3,1.1981e-3,1.00226e-3,0.986257e-3,0.873091e-3,0.664057e-3,0.953581e-3]
poz47= [[-0.370619e-3,0.00840055e-3,-0.39476e-3],[-0.723785e-3,0.0140518e-3,0.27864e-3],[1.15824e-3,-0.264905e-3,-0.303492e-3],[-1.41827e-3,0.0155409e-3,-0.386736e-3],[0.132261e-3,-0.0545782e-3,0.127024e-3],[0.985956e-3,0.504522e-3,0.231267e-3],[0.0599332e-3,0.57115e-3,0.276641e-3],[-0.67908e-3,-0.839313e-3,0.29919e-3],[-1.02542e-3,-0.572322e-3,0.56109e-3],[0.387355e-3,-0.356699e-3,-0.519038e-3]]
template47= []
template47.append(clumpTemplate(relRadii=radz47,relPositions=poz47))

#===============================================================
#=================== define packing ============================
#===============================================================

coke=((1.875e-3,20),(1.875e-3,20),(1.875e-3,20),(1.875e-3,20),(1.875e-3,20),(1.875e-3,10),
(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),
(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,20),(1.875e-3,20),(1.875e-3,20),
(1.875e-3,20),(1.875e-3,20),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),
(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),
(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),(1.875e-3,10),
(1.875e-3,10),(1.875e-3,10),(1.875e-3,20),
(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),
(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),
(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,100),(0.9475e-3,67),
(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),
(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,500),(0.50125e-3,618))

nums=['t','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t','t','t','t','t','t','t',
't','t','t','t']

temps=[template1,template5,template7,template9,template10,template11,template15,template16,template17,template18,
template20,template21,template22,template23,template24,template25,template27,template28,template29,template31,
template32,template33,template34,template35,template37,template38,template41,template42,template43,template45,
template46,template2,template3,template4,template8,template11,template12,template13,template14,
template17,template19,template26,template30,template36,template39,template40,template29,template19,template1,
template1,template46,template46,template45,
template20,template21,template22,template23,template24,template25,template27,template28,template29,template31,
template17,template19,template26,template30,template36,template39,template40,template29,template19,template1,template34]

mats=['aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-48',
'aggregate-48','aggregate-48','aggregate-48','aggregate-48','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814',
'aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814','aggregate-814']

for i in range(len(nums)):
    nums[i]=pack.SpherePack()
    nums[i].makeCloud((0.005,0.005,0.005),(0.045,0.045,0.045),rMean=coke[i][0],rRelFuzz=0.0,num=coke[i][1])
    O.bodies.append([utils.sphere(c,r,material=mats[i]) for c,r in nums[i]])
    O.bodies.replaceByClumps(temps[i],[1.0],discretization=5)

for x in range(len(O.bodies)):
 if (O.bodies[x]):
  if isinstance(O.bodies[x].shape,Sphere):
   if O.bodies[x].isStandalone:
    O.bodies[x].shape.color=(0.2,0.3,0.6)
   else:
    O.bodies[x].shape.color=(0.7,0.63,0.0)
  else:
   O.bodies[x].shape.color=(0.2,0.3,0.1)

qtr=qt.Renderer()
qtr.bgColor=(1,1,1)

#===============================================================
#=================== define Engine =============================
#===============================================================

sigmaIso=-1e5

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_ScGeom_FrictPhys_CundallStrack()]),
 PeriTriaxController(label='triax',
  goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
  dynCell=True,maxStrainRate=(0.1,0.1,0.1),
  maxUnbalanced=.01,relStressTol=1e-3,
  doneHook='compactionFinished()'
 ),
 NewtonIntegrator(damping=0.4,gravity=[0,0,0]),
 PyRunner(command='history()',iterPeriod=10000,label='recorder'),
]

O.dt=5e-7

def history():
 plot.addData(unbalanced=unbalancedForce(),
  sxx=-triax.stress[0],syy=-triax.stress[1],szz=-triax.stress[2],
  exx=-triax.strain[0],eyy=-triax.strain[1],ezz=-triax.strain[2],
                sxz=-0.5*(triax.stress[2]+triax.stress[0]), ev=(triax.strain[2]+triax.strain[1]+triax.strain[0]),
                q=-(triax.stress[2]-triax.stress[1]), p=-(triax.stress[2]+triax.stress[1]+triax.stress[0])/3 ,
                R=3*(triax.stress[2]-triax.stress[1])/(triax.stress[2]+triax.stress[1]+triax.stress[0]+1e-2),
                por=porosity(),i=O.iter,)

 print (-triax.stress[2],porosity())

def compactionFinished():
 O.cell.trsf=Matrix3.Identity
 triax.goal=(sigmaIso,sigmaIso,-0.5)
 triax.stressMask=3
 triax.maxStrainRate=(0.1,0.1,0.1)
 triax.doneHook='triaxFinished()'
 triax.maxUnbalanced=1
 dataOld = plot.data
 plot.saveDataTxt('real3coke-Isoe5-500mix-Isopart.txt')
 plot.data = {}
 plot.plot()

#plot.plot()

def triaxFinished():
 dataOld = plot.data
 plot.saveDataTxt('3coke-Isoe5-500mix-Comp.txt')
 print ('Finished')
 O.pause()

Robert Caulk (rcaulk) said : #4

>>Yes, you are right, when I used 500 particles in the same code, I can sun it in parallel.
What should I do now?

I am sorry, I do not understand what you are asking me. Please rephrase the question.

Alireza Sadeghi (asadeghime) said : #5

Hello Robert,

Thank you very much. How can I fix my problem? I mean how can I use parallel calculation for this simulation? Is it not possible to run this code in parallel?
Thanks a lot.

Best Regards,

Alireza

Robert Caulk (rcaulk) said : #6

If this is the warning(?):

"The number of bodies is probably too small for allowing more threads, or the geometry is flat. The contact detection should succeed but not all available threads are used."

Then you cannot run it in parallel without revising the source code.

Alireza Sadeghi (asadeghime) said : #7

No, I have no warning. In addition, I can use parallel when I use 500 particles. Now I have more than 12000 particles. Therefore, the number of bodies is not too small for parallel calculation.

Thank you.

Alireza

Jan Stránský (honzik) said : #8

Please run your larger simulation using one core, use yade.timing module and provide yade.timing.stats.
Maybe most of time is consumed on a stuff, which is not parallelized, which then results in a simulation seemingly not being parellelized..

cheers
Jan

Alireza Sadeghi (asadeghime) said : #9

Dear Jan,

Thank you very much for your response. I applied your comments and I have this in my terminal:

ForceResetter 49 54037.627us 0.02%
InsertionSortCollider 49 269965135.677us 96.36%
InteractionLoop 49 5101713.404us 1.82%
"triax" 49 647611.067us 0.23%
NewtonIntegrator 49 1206346.451us 0.43%
  forces sync 49 126156.097us 10.46%
  motion integration 49 1080081.651us 89.53%
  sync max vel 49 25.183us 0.00%
  terminate 49 17.333us 0.00%
  TOTAL 196 1206280.264us 99.99%
"recorder" 47 3182985.26us 1.14%
TOTAL 280157829.486us 100.00%

In addition, when I used 8 CPU for the larger simulation, after two hours, the program used one CPU 100% and other seven CPUs worked at almost 50%. It means that, although all the cpus did not participate in the simulation equally, they have effect on the speed.
Do you know how can I receive to faster calculation with my code?
Thank you again.

Best Regards,

Alireza

Jan Stránský (honzik) said : #10

> InsertionSortCollider ... 96.36%

seems a bit suspicious, but currently I am not able to dig deeper into the problem..
cheers
Jan

Robert Caulk (rcaulk) said : #11

Bruno will know for sure, but it seems possible that the sorting is unable to use parallelization because a bound moves outside of a single thread's domain (if I understand correctly) [1]. Maybe this has something to do with the use of clumps+periodic.

Could you tell us if you observe the same performance issue when you use:

-unclumped particles + periodic triax
-clumped particles + nonperiodic triax
-unclumped particles + non periodic triax

?

Cheers,

Robert

https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/InsertionSortCollider.cpp#L145

Alireza Sadeghi (asadeghime) said : #12

Dear Robert,

You are absolutely right. Sure, I will do those simulations in the three days later. Now, I am running a similar code (1000 particles+using clumps+periodic boundary) but all the particles are in the same size (with different templates but the overall size is the same). This code is running parallel very well.
The problem arises when I add small particles in the aforementioned mixture.

Best Regards,

Alireza

ehsan benabbas (ehsanben) said : #13

Hi Alireza,

I had a similar problem with my code as yours. When I tried to define my sample with my desire dimensions (for the sample and grains) I got a long run-time and similarly, about 90% of the time-run and CPU process was dedicated to "InsertionSortCollider", eventhough I used -j8 threads and all of those was working perfectly. Somehow it can be reasonable as the number of grains affects different things through in the process. One thing happens is that when you use a large number of particles and put them into computation, much more contacts will be formed and this leads to that about 90%. Still, I like to learn more to modify my code as well. Hope you find a way in this discussion so that we can use it too.

Bests,
Ehsan

Alireza Sadeghi (asadeghime) said : #14

Hi Ehsan,

Thank you for your reply. My problem is "when I run a simulation with 12,000 particles with 8 CPUs, the software just uses one CPU and the other seven CPUs do not participate in the simulation. Therefore, it takes a long time. But, when I am using, for example, 1000 particles, all of my CPUs work 100%. Do you have a similar problem?

Best Regards,

Alireza

Jérôme Duriez (jduriez) said : #15

For the record, OpenMP parallel execution of some part of InsertionSortCollider for periodic simulations is currently not supported.

See this block [*] which is unable to call insertionSortParallel() in such case.
(because the latter is not designed for periodic simulations [**])

Adding to the confusion of the discussion, OpenMP parallel execution of the same part of InsertionSortCollider for non-periodic simulations is currently deactivated, actually.. (see current state of [*])
But this should be temporary.

Note that the number of particles with respect to 1000 also plays a role [*], and that YADE now offers MPI (instead of OpenMP) parallel computing.

[*] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/InsertionSortCollider.cpp#L497
[**] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/InsertionSortCollider.cpp#L73

Alireza Sadeghi (asadeghime) said : #16

Thank you, dear Jerome.

Hi,
I checked you script.
The problem is that the automatic verletDist is based on minimum particle size.
As it turns out that it doesn't lead to a wise decision in your highly heterogeneous case (the extra length is much too small), and consequently the collision detection occurs much too often.
You need to increase verletDist to decrease collision frequency to ~1/100 iterations or less. [1]

In addition, with 140k spheres in periodic conditions the initial sort (iteration 1) is slow. It could be improved probably, but that cost remain small compared to an entire simulation (it suggests that 1 iteration should be done before enabling timing, though, in order to get consistent measurements).

I hope it helps.

Bruno

[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=verletdist#yade.wrapper.GeneralIntegratorInsertionSortCollider.verletDist