run yade in parallel
Hi everyone
I want to run polyhedra particles in this computer:
CPU (Cores):16
2.3 Hz
Hard disc (HDD): 80 GB
Ram: 32 GB
ubuntu : 16.04
yade 1.20.0
number of bodies : 1511
for increasing speed in iterations per seconds and anything else, how many number of cores on the machine is better to use ? -j8 or -j12 or -j14 or -j16?
Thanks,
Mahdeyeh
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hello,
the best option is to test and decide yourself according to your specific simulation.
Cheers
Jan
Revision history for this message
|
#2 |
Than you Jan
I think so.
I ran the codes with : yade j-8 code.py , but it shows this error:
"ERROR /build/
I think it because of my particles are polyhedra not sphere, yes? so is this error is important? How I can solve it?
Here is my code:
from yade import export,
import os
from yade import plot
import math
from yade import utils
import pylab
import matplotlib; matplotlib.
from matplotlib import pyplot
import numpy as np
from numpy import *
from yade import export as expt
# Input data:
RawVer=
# ListVer is list of all the vertices of ring`s polygons
Ver=()
ListVer=[]
for b in RawVer:
if b[0]=='
Ver=()
continue
Cordn=b[0]
Cordn=
Cordn=
Cordn1=
Cordn2=
if not Cordn1 in Ver:
ListVer.append(Ver)
RawVer1=
# ListVer1 is list of all the vertices of boundary`s polygons
Ver1=()
ListVer1=[]
for b in RawVer1:
if b[0]=='
Ver1=()
continue
Cordn=b[0]
Cordn=
Cordn=
Cordn1=
Cordn2=
if not Cordn1 in Ver1:
ListVer1.
RawVer2=
# ListVer2 is list of all the vertices of caved waste rock`s polygons
Ver2=()
ListVer2=[]
for b in RawVer2:
if b[0]=='
Ver2=()
continue
Cordn=b[0]
Cordn=
Cordn=
Cordn1=
Cordn2=
if not Cordn1 in Ver2:
ListVer2.
# Materials type:
Dolomite = PolyhedraMat()
Dolomite.density = 2870 #kg/m^3
Dolomite.young = 24.36e9 #Pa
Dolomite.poisson = 0.2
Dolomite.
Shale = PolyhedraMat()
Shale.density = 2750 #kg/m^3
Shale.young = 6e9 #Pa
Shale.poisson = 0.23
Shale.frictionAngle = radians(42) #rad
for ii in ListVer:
O.bodies.
for iii in ListVer1:
O.bodies.
for iiii in ListVer2:
O.bodies.
O.bodies.erase(340) # delete wall under ring: id: 340
# block z translation and block x, y, z rotations
for b in O.bodies:
if b.mask is 3:
for b in O.bodies:
if b.mask is 5:
# function for calming particles
def calm():
for c in O.bodies:
# returns a value that can be useful for evaluating the stability of the packing. It is defined as (mean force on particles)/(mean contact force), so that it tends to 0 in a stable packing.
def checkUnbalanced():
print "iter %d , unbalanced forces %f"%(O.iter, utils.unbalance
iter00=O.iter
Unbalanced=
Unbalanced.
Unbalanced.
# Engines:
#os.mkdir(
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
NewtonIntegr
]
utils.calm()
# the model has to calm, because there are some overlaps in particles.
O.engines=
O.engines=
O.dt=10e-6
O.saveTmp('model1')
O.save(
# first run of model
O.run(50000,True)
O.save(
# Outputs:
clrOre=
clrWaste=
def positions():
for b in O.bodies:
if b.shape.
def oreAmount():
clrOre=
M_o=0
for b in O.bodies:
if b.shape.
return M_o
os.mkdir(
O.engines=
PolVtkData = expt.VTKExporte
def VTKview():
PolVtkData.
m_o = 0.00005 # mass of ore from the block
m_w = 0.00005 # mass of waste
R = 0 # R total ore utilization
D = 0
D_m = 0
E = 0 # E extraction
M_o = oreAmount() # M_o total ore mass
totalEMass = 1.25 * M_o # Convergence criteria for the models are set as 125% extraction of the ring mass.
def excavation():
m_o = 0.00005
m_w = 0.00005
for b in O.bodies:
if b.state.
if b.shape.
if b.shape.
print 'm_o' , m_o , 'm_w' , m_w
E = ( m_o + m_w) / M_o * 100 ##extraction definition
D = (m_w / (m_w + m_o)) * 100 ##ore dilution
D_m = (1- ( m_o / (m_w + m_o))) * 100 ##metal dilution
R = (m_o / M_o) * 100 ## Total ore recovery
print 'E' , E , 'D' , D , 'D_m' , D_m , 'R' , R
# Extra Engines:
O.engines=
O.engines=
polyhedra_
export.
Revision history for this message
|
#3 |
I add : InsertionSortCo
"WARN /build/
what should I do? is that decrease speed run?
Revision history for this message
|
#4 |
> number of bodies : 1511
> ... The number of bodies is probably too small for allowing more threads
> is that decrease speed run?
no, rather it is not increasing speed.
If you are interested, have a look at the original code [1]. The warning depends on cvunkVerlet variable, which depends on verletDist. So you can try to play with verletDist.
Jan
[1] https:/
Revision history for this message
|
#5 |
Thanks Jan Stránský, that solved my question.