Re: [Yade-users] [Question #690973]: running on a server is slower than on a PC
Question #690973 on Yade changed: https://answers.launchpad.net/yade/+question/690973 yang yi posted a new comment: To Jan Stránský (honzik) and Bruno Chareyre (bruno-chareyre) : Thank you very much for you professional response. My the simulation process likes this: The two kinds of particles falling down and the plank will open or close according to the rate of one kind of particle. My job is to design the control algorithm of the plank. Because if the martial parameter of particles different, the falling speed of particles and action speed of plank is different. So I must to check if the two speeds are matching or not. And, because I just want to verify the control algorithm, so I hope the falling process could be as fast as possible since training the control algorithm needs a great number of episodes, maybe need two days or three days. So we buy the server. And the server is just for this simulation now. That is why I hope to use the maximum core of this server. I understand you suggestion to get the optimal price of cores. But now for me, to get the fastest speed of the simulation is the aim. I am the author of the posted script. Actually, I just know the running model of pytorch and just to call the neural network package, I do not deeply to learning what the script structure is the best for matching YADE.Bruno Chareyre is right, the pyrunner decide the runing speed. But my question is I use the same OS, the same script, and same configuration in both of PC and server, if I get 3D show, the speed in PC is faster than in the server. However, if I closed the 3D show, the calculation speed of server is faster than PC. Jan Stránský told me the simulation-world speed is the same regardless of the 3D show open or close and the simulation state definitely is not influenced by the 3D view. So it makes me very confusion. without 3D show the calculation speed of server is faster than PC, that mean the iteration number is more than PC. so the 3D view checks the locations roughly, we could find the falling speed is faster than PC. But actually, I find the speed in the server is slower than in PC. So, I will try like this way, to storage the location and check what will happen. Thank you very much -- 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 #691009]: et for ViscElMat with Law2_ScGeom_ViscElPhys_Basic, bug or feature?
New question #691009 on Yade: https://answers.launchpad.net/yade/+question/691009 I had an issue with ViscElMat, started to write a question, ended up solving it myself. So now my question is really: is this a bug or a feature? If you have a material like this ViscElMat(young=200e9,poisson=0.7,frictionAngle=0, en = 0.5 , density=rho , label='ve') and use InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()],[Law2_ScGeom_ViscElPhys_Basic()] ), in O.engines the resulting behavior is completely elastic in the normal direction. The coefficient of restitution is completely ignored. Same behavior regardless of the value of en. (A full working example is below). Now if you do: ViscElMat(young=200e9,poisson=0.7,frictionAngle=0, en = 0.5 , et=1.0, density=rho , label='ve') Then you get the expected viscoelastic behavior, with differing response as en is changed. But you also get the exact same behavior with this ViscElMat(young=200e9,poisson=0.7,frictionAngle=0, en = 0.5 , et=0.0, density=rho , label='ve') or even this ViscElMat(young=200e9,poisson=0.7,frictionAngle=0, en = 0.5 , et=1000.0, density=rho , label='ve') The value of et is completely ignored, as long as its specified. So if the value is ignored, why force the user to specify it? Why not just ignore it all the time? Is this a bug, or was this done intentionally for some reason? FWIW, The fact that et is ignored is mentioned in the documentation for Law2_ScGeom_ViscElPhys_Basic, but the fact that you get elastic behavior if et is omitted is not. Using yade version 20200511-3819~5bf8512~buster1 import matplotlib.pyplot as pyplot from yade import qt, plot qt.View() #open the controlling and visualization interfaces box_x = 0.05 box_y = 0.05 box_z = 0.05 particle_dia = 0.005 young2 = 200e9 rho= 8230 mn = Vector3(0, box_y, 0) mx = Vector3(box_x,2*box_y, box_z) #corners of the initial packing thick = 2*particle_dia # the thickness of the walls global ballIds #first create a very tall loose pack # sp=pack.SpherePack() bigmx = (mx[0], 3 * mx[1], mx[2]) restitution = 0.8 #this always gives elastic behavior. ball rebounds more or less exactly to starting height O.materials.append(ViscElMat(young=young2,poisson=0.7,frictionAngle=0, en = restitution , density=rho , label='ve')) #this give viscoelastic behavior. ball rebounds to 64% of initial height as expected. et is ignored, as long as it is specificed. #O.materials.append(ViscElMat(young=young2,poisson=0.7,frictionAngle=0, en = restitution , et=1000, density=rho , label='ve')) ball = sphere( (mx[0]/2, 2*mx[1] , mx[2]/2 ) , particle_dia/2, material='ve' ) ballIds = O.bodies.append(ball) walls=utils.aabbWalls([mn,bigmx],thickness=thick,oversizeFactor=1.5,material='ve') wallIds=O.bodies.append(walls) #turn on gravity and let it settle O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()] ), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()] ), NewtonIntegrator(gravity=(0,-9.81,0),damping=0.0), PyRunner(command='addPlotData()', iterPeriod=100), ] O.dt=.05*PWaveTimeStep() def addPlotData(): plot.addData(time=O.time , pos = (O.bodies[ballIds].state.pos[1]-box_y)/0.15 ) plot.plots={'time':('pos')} plot.plot() #O.run(-1, True) -- 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 #690973]: running on a server is slower than on a PC
Question #690973 on Yade changed: https://answers.launchpad.net/yade/+question/690973 Bruno Chareyre proposed the following answer: > Start the script by the 'start' button on the Controller(), without "3D" show [...] did 10 iteration test [...] Because I get the time by hand, so there is errors How do you get time "by hand" for 10 iterations after clicking "start"? You manage to click "stop" right in time? -j48 24.51s -j52 24.55s -j60 26.53s -j88 23.29s \ 23.12s -j90 23.27s \ 23.72s -j96 23.91s Mmmmh... sorry but, why do you refuse to measure -j1? Is it against some sort of religion? I have seen this "-jNmax must be better" approach before, with people doing it always - even at the price of slowing down their daily workstation. It is in fact a very bad practice. It could as well be slower! If you don't try you'll never know and you will waste 96 cores 24/24 for no good. It is obvious in your numbers than you gain *nothing* in this range of -j. We will not discuss 5%, especially considering time measurements by hand. If I may ask, are you the author of the script you posted? Because I think that's what needs inspection first. Is torch module parallel? Also there are many pyRunner's inside, even one with iterPeriod=1. How much do they cost, and do they exploit OpenMP? 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
Re: [Yade-users] [Question #690842]: How to get animation of simulation process in Yade simulation?
Question #690842 on Yade changed: https://answers.launchpad.net/yade/+question/690842 Status: Answered => Solved weijie confirmed that the question is solved: Thanks Jérôme Duriez, that solved my 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 #690948]: Making a sphere layer with certain orientation
Question #690948 on Yade changed: https://answers.launchpad.net/yade/+question/690948 Status: Answered => Solved Chien-Cheng Hung confirmed that the question is solved: Thanks Jan Stránský, that solved my 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 #690948]: Making a sphere layer with certain orientation
Question #690948 on Yade changed: https://answers.launchpad.net/yade/+question/690948 Status: Open => Answered Jan Stránský proposed the following answer: you use for center,radius in sp: # [1] not directly bodies Try: ### sp=pack.SpherePack() sp.makeCloud((0,0,0),(20,20,5), rMean = 1) center = Vector3(0,0,0) rotation = Quaternion((1,0,0),.25*pi) for c,r in sp: c = center + rotation * (c - center) O.bodies.append(utils.sphere(c,r)) ### cheers Jan [1] https://yade-dem.org/doc/yade.pack.html#yade._packSpheres.SpherePack -- 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 #690997]: TesselationWrapper used together with gridConnections
New question #690997 on Yade: https://answers.launchpad.net/yade/+question/690997 Hi, everyone I have a cubic sample with facets as boundaries on 4 of the sides, and plane grids consisting of gridConnections on the 2 others. I'm trying to get microstrain of the sample using TesselationWrapper, however, the generated "strain.vtk" file cannot be opened in Paraview. I get error message: "ERROR: In /build/paraview-lH8wFv/paraview-5.4.1+dfsg3/VTK/IO/Legacy/vtkDataReader.cxx, line 3169 vtkUnstructuredGridReader (0x7fd57790): Error reading ascii cell data! for file: /home/erik/Desktop/Membrane/TesselationTest/simData_27-5_12:53/strain.vtk " I can visualize the results in Paraview just fine when using facets on all boundaries generated with aabbWalls(..), but not with gridConnection boundaries. I'm assuming it has something to do with either the "missing" facet boundaries on 2 of the sides, or that the gridNodes/gridConnections are creating problems for the tesselation. Therefore, I'm wondering if there is anyway to specify the boundaries of the tesselation other than using facets on all sides? Or decide which body ids should be included in the tesselation? Any other workaround to this problem is also very much appreciated! Thanks! -- 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 #690948]: Making a sphere layer with certain orientation
Question #690948 on Yade changed: https://answers.launchpad.net/yade/+question/690948 Status: Answered => Open Chien-Cheng Hung is still having a problem: Hi Jan, Thanks for your information. It's very useful. I tried to apply the same trick to "sp.makeCloud()" because I would like to assign material properties and different particles size to the spheres. ### sp=pack.SpherePack() sp.makeCloud((0,0,0),(20,20,5), rMean = 1) center = Vector3(0,0,0) rotation = Quaternion((1,0,0),.25*pi) for b in sp: b.state.pos = center + rotation * (b.state.pos - center) O.bodies.append([utils.sphere(s[0],s[1]) for s in sp]) ### However, the terminal shows "AttributeError: 'tuple' object has no attribute 'state'" after I ran the above code. How do I rotate a random loose packing by using makeCloud? Cheers, Chien-Cheng -- 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 #690973]: running on a server is slower than on a PC
Question #690973 on Yade changed: https://answers.launchpad.net/yade/+question/690973 Jan Stránský proposed the following answer: > -j32 26.1s > -j48 24.51s > -j90 23.27s \ 23.72s > -j92 23.05s \ 23.76s \ 24.24s \ 24.09s > the -j92 or -j90 maybe the optimal jobs pretty much depending on the definition of "optimal". Compared to -j32, -j90 is just 10% faster, but using almost 3x more CPU power. > -j48 1386.40 iter/s > -j90 1279 iter/s > It seems that -j90 is the best. same as above > It looks that ... in the 3D show are different, > I hope to check if the rotation speed matches the falling speed of particles > or not. The direct way is the 3D show. 3D view is just for rough checks. Use "hard numbers" for serious comparisons (like O.bodies[...].state.vel) > if I close the 3D show, the speed of the plank and particles are the same with 3D show open or not? yes (if you mean the simulation-world speed) > If the speed of plank and particles are not depend on the 3D show. simulation state definitely is not influenced by the 3D view (if it was, it would be a bug). > I will storage the bodies' location of the simulation process, and replay the locations after the simulation is over. I would say this is a standard approach > is there a better way to do that? to do what? (storage the bodies' location, replay after the simulation, after the simulation is over, ...) 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