Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-20 Thread Bruno Chareyre
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Bruno Chareyre posted a new comment:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-19 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Answered => Solved

Alireza Sadeghi confirmed that the question is solved:
Thank you, dear Jerome.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-18 Thread Jérôme Duriez
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Jérôme Duriez posted a new comment:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-18 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Alireza Sadeghi posted a new comment:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-18 Thread ehsan benabbas
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

ehsan benabbas posted a new comment:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-18 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Alireza Sadeghi posted a new comment:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-18 Thread Robert Caulk
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Open => Answered

Robert Caulk proposed the following answer:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-16 Thread Jan Stránský
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Jan Stránský posted a new comment:
> InsertionSortCollider ... 96.36%

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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-16 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Needs information => Open

Alireza Sadeghi gave more information on the question:
Dear Jan,

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

ForceResetter49  54037.627us
0.02%  
InsertionSortCollider49   269965135.677us   
96.36%  
InteractionLoop  495101713.404us
1.82%  
"triax"  49 647611.067us
0.23%  
NewtonIntegrator 491206346.451us
0.43%  
  forces sync  49 126156.097us  
 10.46%
  motion integration   491080081.651us  
 89.53%
  sync max vel 49 25.183us  
  0.00%
  terminate49 17.333us  
  0.00%
  TOTAL   1961206280.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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Jan Stránský
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Open => Needs information

Jan Stránský requested more information:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Answered => Open

Alireza Sadeghi is still having a problem:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Robert Caulk
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Open => Answered

Robert Caulk proposed the following answer:
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.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Needs information => Open

Alireza Sadeghi gave more information on the question:
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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Robert Caulk
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Open => Needs information

Robert Caulk requested more information:
>>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.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Alireza Sadeghi
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Answered => Open

Alireza Sadeghi is still having a problem:
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.74e-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= 

Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Robert Caulk
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Robert Caulk proposed the following answer:
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?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Bruno Chareyre
Question #688771 on Yade changed:
https://answers.launchpad.net/yade/+question/688771

Status: Open => Answered

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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688771]: run with Yadedaily

2020-02-14 Thread Alireza Sadeghi
New question #688771 on Yade:
https://answers.launchpad.net/yade/+question/688771

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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp