segmentation fault

Asked by leishaoxin

Hello,

I use the yade 1.07.0 and ubuntu 14.04. after I run my iteration about 60000 times, it shows a segmentation fault. I have read some related questions, it said user need to open a bug. I don't know what means "open a bug", i follow the instruction from https://www.yade-dem.org/doc/user.html#crashes, after I done 2 steps.

Yade [1]: import os,signal
Yade [2]: os.kill(os.getpid(),signal.SIGSEGV)

it shows segmentation fault again.

I also read that install a daily version is a solution but after 3 lines
sudo add-apt-repository ppa:yade-pkg/stable
sudo apt-get update
sudo apt-get install yade-stable

it said "E: Unable to locate package yade-stable"

what happens?
this is my script.
from yade import pack
from yade import timing
from yade import qt
import gts, locale

idPFA=O.materials.append(FrictMat(density=100,young=5e6,poisson=.32,frictionAngle=.1,label="PFA"))
idSOIL=O.materials.append(FrictMat(density=500,young=5e6,poisson=.32,frictionAngle=.53,label="soil"))
idFEN=O.materials.append(FrictMat(density=800,young=8e6,poisson=.32,frictionAngle=.53,label="fence"))

surf=gts.read(open('sphere.gts'))
surf2=gts.read(open('slope.gts'))
surf3=gts.read(open('fence.gts'))

if surf.is_closed():
        pred=pack.inGtsSurface(surf)
        aabb=pred.aabb()
        dim0=aabb[1][0]-aabb[0][0]; radius=dim0/60. # get some characteristic dimension, use it for radius
        O.bodies.append(pack.regularHexa(pred,radius=radius,gap=radius/4.,material=idPFA))

O.bodies.append(pack.gtsSurface2Facets(surf2,wire=True,material="soil"))
O.bodies.append(pack.gtsSurface2Facets(surf3,wire=True,material="fence"))

O.engines=[
         ForceResetter(),
         InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],label='collider'),
         InteractionLoop(
                        [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
   [Ip2_FrictMat_FrictMat_FrictPhys()],
   [Law2_L3Geom_FrictPhys_ElPerfPl()],
   ),
   NewtonIntegrator(damping=0.015,gravity=[0,0,-9.81]),
   PyRunner(iterPeriod=5000000,command='timing.stats(); O.pause();'),
   VTKRecorder(iterPeriod=15000,recorders=['all'],fileName='3d-vtk-'),

]
O.dt=0.05*PWaveTimeStep()
O.saveTmp()

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,

> I use the yade 1.07.0 and ubuntu 14.04. after I run my iteration about
> 60000 times, it shows a segmentation fault. I have read some related
> questions, it said user need to open a bug. I don't know what means "open a
> bug", i follow the instruction from
> https://www.yade-dem.org/doc/user.html#crashes, after I done 2 steps.
>

"open a bug" means that instead of "Ask a question" you click "Report a
bug" on https://launchpad.net/yade. Both buttons should be close to each
other.

I tried your script, but you import a gts files, which I don't have. Please
open a bug :-) and attach both the script file and the gts files (all of
them). Then we can try it and tell you where the problem is or fix a bug if
it is the case.

cheers
Jan

Revision history for this message
leishaoxin (leishaoxin) said :
#2

Hello Jan

I don't know what means "open a bug"

my gts file and script is attached by the onedrive link
https://onedrive.live.com/redir?resid=ECC241A9545DCA1A!1810&authkey=!ABfhlWRx8KDa8a0&ithint=folder%2cgts

Regards
Shaoxin

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

Hi Shaoxin,

thanks for the files.

In InteractionLoop, you are using L3Geom. I think this is not maintained
any more. Where did you find such example?

I modified your code to use
Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),
Law2_ScGeom_FrictPhys_CundallStrack()
and then it works fine after 60000 steps.

cheers
Jan

2014-07-29 16:46 GMT+02:00 leishaoxin <email address hidden>
:

> Question #252356 on Yade changed:
> https://answers.launchpad.net/yade/+question/252356
>
> Status: Answered => Open
>
> leishaoxin is still having a problem:
> Hello Jan
>
> I don't know what means "open a bug"
>
> my gts file and script is attached by the onedrive link
>
> https://onedrive.live.com/redir?resid=ECC241A9545DCA1A!1810&authkey=!ABfhlWRx8KDa8a0&ithint=folder%2cgts
>
> Regards
> Shaoxin
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
leishaoxin (leishaoxin) said :
#4

Hi Jan

Thanks It's work. :)
it is based on the example https://github.com/yade/trunk/blob/master/examples/gts-horse/gts-horse.py

Regards
Shaoxin

Revision history for this message
leishaoxin (leishaoxin) said :
#5

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