Re: [Yade-users] [Question #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-23 Thread Janek Kozicki
Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

Status: Open => Needs information

Janek Kozicki requested more information:
> ptrace: Operation not permitted.

Actually that’s a very unhelpful crash log. Please have a look at
 https://yade-dev.gitlab.io/trunk/introduction.html#fdbg

-- 
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 #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-23 Thread Son Pham Thai
New question #679445 on Yade:
https://answers.launchpad.net/yade/+question/679445

Hi YADE community,

I have a problem as the question's title said. 

The procedure that  I have done:

1.  Packing generation
2.  Save the result by using O.save()
3.  Reload the saved yade.gz file by using O.load()
4. Working around with the material and interaction and got the crash

Mini working scripts:
--- [Step 1] ---


### INPUT for Material  ###
young0= 30e9 
poisson0= 0.2
density0 = 2530
compFricDegree=15

### PARAMETERs of particle packing  ###
mn=Vector3(0.,0.,0.)
mx=Vector3(.4e-2,.6e-2,.4e-2) 
rMean0=4e-4 
rRelFuzz0=5./100 
porosity0=0.4
distributeMass0=True
seed0=1

### INPUT for mechanical loading ###
maxVel0=5e-7
confiningS= -2.725e5 

### defining MATERIALs ###
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=radians(compFricDegree),
 density=density0, label='spheres'))
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

### creating the boundary walls ###
walls=aabbWalls((mn,mx),thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)

### generating spheres ###
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=rMean0,rRelFuzz=rRelFuzz0,porosity=porosity0,distributeMass=distributeMass0,seed=seed0)
 # POLY
O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])

### mechanical loading  To confer a solid-like nature to the packing

triax=TriaxialStressController(
internalCompaction=True,
goal1=confiningS,
goal2=confiningS,
goal3=confiningS,
max_vel=maxVel0, 
label="triax"
)

triax.maxMultiplier=1.+5e-6
triax.finalMaxMultiplier=1.+1e-7 

newton=NewtonIntegrator(damping=.4, gravity=(0.0,-9.81,0.0))

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(label='aabb'),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(label='Ig2ssGeom'),Ig2_Box_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True,
 label="cohesiveIp")],

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True, always_use_moment_law=False,  
label='cohesiveLaw')]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
triax,
newton
]   

### --- 1st stage, particle growing while boundary walls are fixed -- ###

NumDEMRun1=10
while 1:

O.run(NumDEMRun1,True) 
unb=unbalancedForce() 

if unb<0.01 and 
abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break

### --- 2nd stage, particle sizes are fixed while boundary walls move very 
slowly -- ###

finalFricDegree = 30 # contact friction during the deviatoric loading
triax.internalCompaction=False
setContactFriction(radians(finalFricDegree))

NumDEMRun2=5

while 1:

O.run(NumDEMRun2 ,True) 
unb=unbalancedForce()

if unb<0.001 and 
abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break  

*
--- [Step 4] ---

compFricDegree = 1 # Scholtes
young0= 30e9 
poisson0= 0.2
density0 = 2530
tensileStrength = 40e5  
shearStrength = 40e6 

### setup the material properties, first, Cohesion material 
O.materials.append(CohFrictMat(young=young0,poisson=poisson0,density=density0,frictionAngle=radians(compFricDegree),
 normalCohesion=tensileStrength, shearCohesion=shearStrength, 
momentRotationLaw=True,label='CohFrictspheres')) 

### --- change material of the spheres to create cohesive bond between 
particles  --- ###

pairs = [(i.id1,i.id2) for i in O.interactions]
for b in O.bodies: 
if not isinstance(b.shape,Box): 
b.mat = O.materials[2]  
### [0] is Friction spheres, [1] is frictionlessWalls, [2] is 
the newly added CohFrict sphere

O.interactions.clear()
for id1,id2 in pairs: utils.createInteraction(id1,id2)  ### The crash occurs 
here

*

Any help or suggestion is highly appreciate!
Son Pham





-- 
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 #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-23 Thread Son Pham Thai
Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

Son Pham Thai gave more information on the question:
PS: the full crash log is:

SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-RXasLj/tmp-0'
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
/tmp/yade-RXasLj/tmp-0:1: Error in sourced command file:
ptrace: Operation not permitted.
(gdb)

-- 
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