yade::InteractionLoop::action(): assumption ‘!swap’ failure

Asked by Xue

Hi everyone,
 I changed computers during the calculation of spherical and polyhedral particles, resulting in errors and flashbacks of models that would otherwise run.
The following is the system information of the computer with the error.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Welcome to Yade 20211219-6187~d81270c~xenial1
Using python version: 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609]
TCP python prompt on localhost:9000, auth cookie `csyeua'
XMLRPC info provider on http://localhost:21000
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Here is the error message:
python3.5: /builds/yade-dev/trunk/deb/yadedaily/core/InteractionLoop.cpp:159:virtual void yade::InteractionLoop::action(): assumption ‘!swap’ failure.

The following are the main parts of the model scripts:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
from yade import pack,qt,plot,utils,polyhedra_utils,ymport,export,pack,timing
from yade import *
import numpy
from pprint import pprint
import random
from random import uniform
from random import randint
from math import *

matP = PolyhedraMat()
matP.density = 2650 #kg/m^3
matP.young = 55E9#Pa 5.5E9
#matP.young = 2.75 #Pa 1E7
matP.poisson = 0.25 # 20000/1E7
matP.frictionAngle = 0.27 #rad0.7
O.materials.append(matP)
steel = PolyhedraMat()
steel.density = 2600 #kg/m^3
steel.young = 150E9 #inital steel was 15E9
steel.poisson = 0.21
steel.frictionAngle = 0.2 #rad
O.materials.append(steel)

sphereballast = CohFrictMat()#Coh
sphereballast.density = 2000
#sphereballast.young = 5.5E8
sphereballast.young = 3E8
sphereballast.possion = 0.5
sphereballast.frictionAngle = 0.1364 #rad0.364
sphereballast.alphaKr = 2
sphereballast.etaRoll = 1

sphereballast.isCohesive = TrueO.bodies.append(ymport.textExt('/tmp/sphere low1.dat',format='x_y_z_r',material=sphereballast))
O.bodies.append(ymport.textPolyhedra('/tmp/pack low1.dat',material=matP))
O.materials.append(sphereballast)

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Sphere_Aabb()]),
 InteractionLoop(
  [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(), Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),Law2_ScGeom_FrictPhys_CundallStrack(), Law2_ScGeom6D_CohFrictPhys_CohesionMoment()],
 ),
 NewtonIntegrator(damping=0.7,gravity=(0,0,-9.8000)),
 PyRunner(command='Compact()',iterPeriod=1,label='compact'),
]

def Compact():
 global a
 if a == 1:
  ldpltheight=max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)])
  ldplt=polyhedra_utils.polyhedra(steel,v=((-0.148,0,ldpltheight),(-0.073*sqrt(3),-0.073,ldpltheight),(-0.073,-0.073*sqrt(3),ldpltheight),(0,-0.148,ldpltheight),(0.073,-0.073*sqrt(3),ldpltheight),(0.073*sqrt(3),-0.073,ldpltheight),(0.148,0,ldpltheight),(0.073*sqrt(3),0.073,ldpltheight),(0.073,0.073*sqrt(3),ldpltheight),(0,0.148,ldpltheight),(-0.073,0.073*sqrt(3),ldpltheight),(-0.073*sqrt(3),0.073,ldpltheight),(-0.148,0,ldpltheight+0.01),(-0.073*sqrt(3),-0.073,ldpltheight+0.01),(-0.073,-0.073*sqrt(3),ldpltheight+0.01),(0,-0.148,ldpltheight+0.01),(0.073,-0.073*sqrt(3),ldpltheight+0.01),(0.073*sqrt(3),-0.073,ldpltheight+0.01),(0.148,0,ldpltheight+0.01),(0.073*sqrt(3),0.073,ldpltheight+0.01),(0.073,0.073*sqrt(3),ldpltheight+0.01),(0,0.148,ldpltheight+0.01),(-0.073,0.073*sqrt(3),ldpltheight+0.01),(-0.073*sqrt(3),0.073,ldpltheight+0.01)),fixed=False, color=(0.75,0.65,0.65))
  O.bodies.append(ldplt)
  a=a+1
 elif a == 2:
  Lastnum=O.bodies[-1].id
  O.bodies[Lastnum].state.blockedDOFs='xyXYZ'
  #O.bodies[Lastnum].state.vel=[0,0,-0.05]
  O.bodies[Lastnum].state.angVel=(0,0,0)
  O.forces.setPermF(Lastnum,(0,0,-900))
  #Lastnum1=O.bodies[0].i
  #O.bodies[Lastnum1].state.blockedDOFs='xyXYZ'
  a=a+1
 elif a == 3:
  Lastnum=O.bodies[-1].id
  plateF=O.forces.f(Lastnum)[2]
  print ("Load= %.5f"%(plateF))
  ldpltheight=max([b.state.pos[2] for b in O.bodies if isinstance(b.shape,Sphere)])
  print ("pos=%.8f"%(ldpltheight))
  #s=O.bodies[Lastnum1].state.pos[2]
  #print ("planepos up=%.8f"%(s))
  s1=O.bodies[Lastnum].state.pos[2]
  print ("planepos up=%.8f"%(s1))
  t=O.bodies[Lastnum].state.ori
  print (t)

How should the above question be modified? Any suggestions are welcome!

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
Jan Stránský (honzik) said :
#1

Hello,

please be more specific.

> I changed computers during the calculation

What does "changed computers" mean?
What does "during the calculation" mean?

> that would otherwise run.

What does "otherwise" mean?

> The following is the system information of the computer with the error.

and system without the error?

> How should the above question be modified? Any suggestions are welcome!

see above, give more information and be more specific.

Also have a look at similar discussion [1].
Using "many" shapes, materials and laws2 together might result in this kind of error or other problems, because it is unusual use case (meaning no or few people use it and thus it is not very much tested).

Cheers
Jan

[1] https://answers.launchpad.net/yade/+question/269315

Revision history for this message
Xue (1q12) said :
#2

Hi jan,
I'm so sorry for the inaccurate description that caused confusion for you.
> I changed computers during the calculation
> that would otherwise run.
For those two points, I mean that I tested the above script on two computers, both with Ubuntu 16.04 and the program I used was yadedailly. Only one computer showed the above error, but on the other computer, the script was able to be calculated normally.
>system without the error?
Welcome to Yade 20191003-2325~8ce2132~xenial1
Using python version: 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609]
Indeed, on the computer where the script works, yadedaily has been installed for a long time and has not been updated, while on the computer with the problem, yadedaily has just been installed.

Revision history for this message
Best Jan Stránský (honzik) said :
#3

> Yade 20191003
> Yade 20211219

so the 2 years version difference (and the changes in the meantime) is the most suspicious here.
The true reason of the error is probably that in [1].

Cheers
Jan

Revision history for this message
Xue (1q12) said :
#4

Thank you, Jan.

I will try to install the 2019.1 version of Yade, which may be a palliatives.

xue

Revision history for this message
Xue (1q12) said :
#5

Thanks Jan Stránský, that solved my question.