Segmentation fault (core dumped) O.bodies.append

Asked by Nicholas Ng

Hi,

I'm trying to build up a simulation for direct shear test. However, whenever I try to run the script, an error comes out "segmentation fault (core dumped)". I noticed that other researchers had asked similar question in Launchpad, but I still can't find a solution to my problem here. If this script of mine is working properly, the sequence of simulation should be as follow:

create periodic box > generate spheres > delete periodic box > create shear box > move bottom shear box

I hope to get some advice on how to solve this problem of mine.

Thank you and regards,
Nicholas Ng

***My script is as follow:
==========================================================================================

# create shear box with shear gap
# from direct_shear_test_209.py

from yade import pack,qt,plot

O=Omega()

# ===================add material for DE particles=============================================
O.materials.append(FrictMat(young = 1E7, poisson = 0.25, frictionAngle = 0.6, density = 2650))
# add material for side walls
O.materials.append(FrictMat(young = 1E7, poisson = 0.25, frictionAngle = 0.0, density = 2650))
# add material for top and bottom walls
O.materials.append(FrictMat(young = 1E7, poisson = 0.25, frictionAngle = 0.8, density = 2650))

# =============================================================================================

# ========================================================
# size of the periodic shear box
p_L_x, p_L_y, p_L_z = 0.03, 0.01, 0.01

# size of the shear box
# L_y is half the height of shear box
L_x, L_y, L_z = 0.03, 0.01/2, 0.01
gap=0.00065
half_gap=gap/2
# ==========================================================

# ===================add sphere parameters======================
sp=pack.SpherePack()
min_corner = Vector3(0,0,0)
max_corner = Vector3(L_x,L_y*2,L_z)
psd_sizes = [0.000075,0.00015,0.0003,0.0006,0.00118,0.00236]
psd_sizes_10 = [0.00075,0.0015,0.003,0.006,0.0118,0.0236]
radius_mean = 0.002/2
psd_cumm = [0,0.22,0.32,0.51,0.95,1.0]
r_relFuzz = 0.2
# ===============================================================

# ==============add velocity parameter=================
direction_left = Vector3(-1,0,0)
velocity = 0.005
# =====================================================

##=============================== now define boxes============================================
# lower part, left wall
left_low_center, left_low_extents = (0, L_y/2-half_gap, L_z/2), (0, L_y/2, L_z/2)
# lower part, right wall
right_low_center, right_low_extents = (L_x, L_y/2-half_gap, L_z/2), (0, L_y/2, L_z/2)
# bottom wall
bot_center, bot_extents = (L_x/2, -half_gap, L_z/2), (L_x/2, 0, L_z/2)
# lower part, behind wall
behind_low_center, behind_low_extents = (L_x/2, L_y/2-half_gap, 0), (L_x/2, L_y/2, 0)
# lower part, front wall
front_low_center, front_low_extents = (L_x/2, L_y/2-half_gap, L_z), (L_x/2, L_y/2, 0)
# upper part, left wall
left_upper_center, left_upper_extents = (0, 3*L_y/2+half_gap, L_z/2), (0, L_y/2, L_z/2)
# upper part, right wall
right_upper_center, right_upper_extents = (L_x, 3*L_y/2+half_gap, L_z/2), (0,L_y/2, L_z/2)
# top wall
top_center, top_extents = (L_x/2, 2*L_y+half_gap, L_z/2), (L_x/2, 0, L_z/2)
# upper part, behind wall
behind_upper_center, behind_upper_extents=(L_x/2,3*L_y/2+half_gap,0),(L_x/2,L_y/2, 0)
# upper part, front wall
front_upper_center, front_upper_extents = (L_x/2, 3*L_y/2+half_gap,L_z), (L_x/2,L_y/2, 0)

## generate two additional panels at the middle height of the sample to avoid
# particles from falling out during shearing, the two panels will be expanded
# following shearing process.
# left panel
# left_panel_center, left_panel_extents = (0, L_y, L_z/2), (0, 0, L_z/2)
# right panel
# right_panel_center, right_panel_extents = (L_x, L_y , L_z/2), (0, 0, L_z/2)

left_panel_center, left_panel_extents = (-L_x/4, L_y+half_gap, L_z/2), (L_x/4, 0, L_z/2)

right_panel_center, right_panel_extents = (5*L_x/4, L_y-half_gap, L_z/2), (L_x/4, 0, L_z/2)
# =============================================================================================

# =========================add periodic box=================
O.periodic=True

O.cell.hSize=Matrix3(p_L_x, 0, 0,
       0 ,p_L_y*2, 0,
      0, 0, p_L_z)

# ==========================================================

#======================= append spheres to bodies=============================
sp=pack.SpherePack()
# sp.makeCloud(minCorner=min_corner,maxCorner=max_corner,psdSizes=psd_sizes,psdCumm=psd_cumm,distributeMass=True)
sp.makeCloud(minCorner=min_corner,maxCorner=max_corner,rMean=radius_mean,distributeMass=True,num=200,periodic=True)
# sp.toSimulation()
O.bodies.append([sphere(s[0],s[1]) for s in sp])
# =============================================================================

# ===========================add engines=================================================

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius_mean),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 #PeriTriaxController(maxUnbalanced=0.01,relStressTol=0.02,goal=[-1e4,-1e4,0],stressMask=3,globUpdate=5,maxStrainRate=[1.,1.,1.],doneHook='triaxDone()',label='triax'),
 #using cell inertia
 NewtonIntegrator(damping=.2),
 # PyRunner(command='addPlotData()',iterPeriod=100),
 # qt.SnapshotEngine(fileBase='/home/nng/Shared/DST/from Irfaan/direct_shear_test_208/Snapshot_208b',label='snapper',iterPeriod=100),
    # generate top wall after iter 50,000
    PyRunner(command='deletePeriodicBox()', realPeriod=5, label='checker')
]
O.dt=1e-5*PWaveTimeStep()
# O.run();
# qt.View()
# =======================================================================================

# ===============define function to delete periodic box=============
def deletePeriodicBox():
 O.periodic=False
 print("Successfully delete periodic box!")
 checker.command='generateShearBox()'
# =================================================================

# ===================now add walls to simulation========================================
def generateShearBox():
 global leftBox_low
 leftBox_low = utils.box(center = left_low_center, extents = left_low_extents, fixed = True, wire = True, material = O.materials[1])
 rightBox_low = utils.box(center = right_low_center, extents = right_low_extents, fixed = True, wire = True, material=O.materials[1])
 botBox = utils.box(center = bot_center, extents=bot_extents, fixed = True, wire = True, material=O.materials[2])
 behindBox_low = utils.box(center = behind_low_center, extents = behind_low_extents, fixed = True, wire = True, material=O.materials[1])
 frontBox_low = utils.box(center = front_low_center, extents = front_low_extents, fixed = True, wire = True, material=O.materials[1])
 leftBox_upper = utils.box(center = left_upper_center, extents = left_upper_extents, fixed = True, wire = True, material=O.materials[1])
 rightBox_upper = utils.box(center = right_upper_center, extents = right_upper_extents , fixed=True, wire = True, material=O.materials[1])
 topBox = utils.box(center=top_center, extents = top_extents, fixed = True, wire = True, material=O.materials[2])
 behindBox_upper = utils.box( center = behind_upper_center, extents = behind_upper_extents , fixed=True,wire=True,material=O.materials[1])
 frontBox_upper = utils.box( center = front_upper_center, extents = front_upper_extents, fixed=True,wire=True,material=O.materials[1])
 leftPanel = utils.box( center = left_panel_center, extents = left_panel_extents, fixed=True,wire=True)
 rightPanel = utils.box( center = right_panel_center, extents = right_panel_extents, fixed=True,wire=True)

 # add to O.bodies
 leftBox_low_id = O.bodies.append(leftBox_low)
 rightBox_low_id = O.bodies.append(rightBox_low)
 botBox_id = O.bodies.append(botBox)
 behindBox_low_id = O.bodies.append(behindBox_low)
 frontBox_low_id = O.bodies.append(frontBox_low)
 leftBox_upper_id = O.bodies.append(leftBox_upper)
 rightBox_upper_id = O.bodies.append(rightBox_upper)
 topBox_id = O.bodies.append(topBox)
 behindBox_upper_id = O.bodies.append(behindBox_upper)
 frontBox_upper_id = O.bodies.append(frontBox_upper)
 leftPanel_id = O.bodies.append(leftPanel)
 rightPanel_id = O.bodies.append(rightPanel)

 print("Successfully generate shear box!")
 checker.command='shearing()'

# ========================================================================================

def shearing():
 # O.engines=O.engines+[TranslationEngine(ids=[leftBox_low_id,rightBox_low_id],translationAxis=direction_left,velocity=velocity,label="boxTranslation")]
 O.bodies[1].state.vel=Vector3(-velocity,0,0)
 O.bodies[2].state.vel=Vector3(-velocity,0,0)
 O.bodies[3].state.vel=Vector3(-velocity,0,0)
 O.bodies[4].state.vel=Vector3(-velocity,0,0)
 O.bodies[5].state.vel=Vector3(-velocity,0,0)
 O.bodies[12].state.vel=Vector3(-velocity,0,0)

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,
no idea.. for others, output of catchsegv (it seems the problem is around InsertionSortCollider::action)
Jan

Backtrace:
/usr/lib/x86_64-linux-gnu/yade/libyade.so(+0x1f0227b)[0x7f1d31ff627b]
/usr/lib/x86_64-linux-gnu/libgomp.so.1(GOMP_parallel+0x3f)[0x7f1d294a7ecf]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN21InsertionSortCollider6actionEv+0x3e4)[0x7f1d31ff98a4]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5Scene18moveToNextTimeStepEv+0x4b2)[0x7f1d31dba882]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN14SimulationFlow12singleActionEv+0x33)[0x7f1d31dbdd83]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadWorker16callSingleActionEv+0x4f)[0x7f1d31dc179f]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner4callEv+0x47)[0x7f1d31dbe9b7]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner3runEv+0x50)[0x7f1d31dbec90]
/usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5boost6detail11thread_dataINS_9function0IvEEE3runEv+0x32)[0x7f1d31dc0d52]
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1(+0x11bcd)[0x7f1d2ef7dbcd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f1d352c56db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f1d355fe88f]

Revision history for this message
Janek Kozicki (cosurgi) said :
#2

To obtain a useful Backtrace please make sure that you have compiled
yade with -DDEBUG=1, otherwise the backtrace will be useless.

Also on newer linux kernels you might need to run a command:
  echo 0 > /proc/sys/kernel/yama/ptrace_scope ## debug ON

Backtrace:

Successfully delete periodic box!
Successfully generate shear box!
DEBUG yade/pkg/common/InsertionSortCollider.cpp:207 action: Resize bounds containers from 400 to 424, will std::sort.
python: yade/pkg/common/InsertionSortCollider.cpp:223: virtual void InsertionSortCollider::action(): Assertion `(size_t)BB[0].size==2*scene->bodies->size()' failed.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fa8ccece67d in poll () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
Invalid thread ID: info

Thread 24 (Thread 0x7fa878f0a700 (LWP 11503)):
#0 0x00007fa8ccea704a in __GI___waitpid (pid=11509, stat_loc=stat_loc@entry=0x7fa878f091f0, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007fa8cce2e0ab in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007fa8cc5e2a1e in crashHandler (sig=6) at yade/core/main/pyboot.cpp:13
#3 <signal handler called>
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5 0x00007fa8cce2342a in __GI_abort () at abort.c:89
#6 0x00007fa8cce1ae67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7fa8cb4e9478 "(size_t)BB[0].size==2*scene->bodies->size()", file=file@entry=0x7fa8cb4e90c8 "yade/pkg/common/InsertionSortCollider.cpp", line=line@entry=223, function=function@entry=0x7fa8cb4f22e0 <InsertionSortCollider::action()::__PRETTY_FUNCTION__> "virtual void InsertionSortCollider::action()") at assert.c:92
#7 0x00007fa8cce1af12 in __GI___assert_fail (assertion=assertion@entry=0x7fa8cb4e9478 "(size_t)BB[0].size==2*scene->bodies->size()", file=file@entry=0x7fa8cb4e90c8 "yade/pkg/common/InsertionSortCollider.cpp", line=line@entry=223, function=function@entry=0x7fa8cb4f22e0 <InsertionSortCollider::action()::__PRETTY_FUNCTION__> "virtual void InsertionSortCollider::action()") at assert.c:101
#8 0x00007fa8ca92e675 in InsertionSortCollider::action (this=0x556bcc023b10) at yade/pkg/common/InsertionSortCollider.cpp:223
#9 0x00007fa8ca458a42 in Scene::moveToNextTimeStep (this=this@entry=0x556bca0c9d30) at yade/core/Scene.cpp:97
#10 0x00007fa8ca45bf47 in SimulationFlow::singleAction (this=0x556bca0c9b10) at yade/core/SimulationFlow.cpp:24
#11 0x00007fa8ca45fa67 in ThreadWorker::callSingleAction (this=0x556bca0c9b10) at yade/core/ThreadWorker.cpp:71
#12 0x00007fa8ca45cb37 in ThreadRunner::call (this=this@entry=0x556bca1c2d30) at yade/core/ThreadRunner.cpp:52
#13 0x00007fa8ca45ce78 in ThreadRunner::run (this=0x556bca1c2d30) at yade/core/ThreadRunner.cpp:26
#14 0x00007fa8ca45eed2 in boost::function0<void>::operator() (this=<optimized out>) at /usr/include/boost/function/function_template.hpp:771
#15 boost::detail::thread_data<boost::function0<void> >::run (this=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:116
#16 0x00007fa8c7320116 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0
#17 0x00007fa8cdaba494 in start_thread (arg=0x7fa878f0a700) at pthread_create.c:333
#18 0x00007fa8cced7acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

We can see that the problem is in InsertionSortCollider with Assertion `(size_t)BB[0].size==2*scene->bodies->size()'

You might want to try a different collider
https://yade-dev.gitlab.io/trunk/user.html#bo1-functors
https://yade-dev.gitlab.io/trunk/yade.wrapper.html#collider

https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.SpatialQuickSortCollider

is suppose to be the safest one.

OTOH, it looks like maybe there is a bug in InsertionSortCollider because following lines are in contradiction with each other:

 long nBodies=(long)scene->bodies->size();
 ...
 if(BB[0].size!=2*nBodies){
 ... // fix the BB[0].size
 }
 assert((size_t)BB[0].size==2*scene->bodies->size()); // Crash here.

best regards
Janek

Jan Stránský said: (by the date of Tue, 12 Feb 2019 16:32:29 -0000)

> Question #678494 on Yade changed:
> https://answers.launchpad.net/yade/+question/678494
>
> Jan Stránský posted a new comment:
> Hello,
> no idea.. for others, output of catchsegv (it seems the problem is around InsertionSortCollider::action)
> Jan
>
> Backtrace:
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(+0x1f0227b)[0x7f1d31ff627b]
> /usr/lib/x86_64-linux-gnu/libgomp.so.1(GOMP_parallel+0x3f)[0x7f1d294a7ecf]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN21InsertionSortCollider6actionEv+0x3e4)[0x7f1d31ff98a4]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5Scene18moveToNextTimeStepEv+0x4b2)[0x7f1d31dba882]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN14SimulationFlow12singleActionEv+0x33)[0x7f1d31dbdd83]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadWorker16callSingleActionEv+0x4f)[0x7f1d31dc179f]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner4callEv+0x47)[0x7f1d31dbe9b7]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner3runEv+0x50)[0x7f1d31dbec90]
> /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5boost6detail11thread_dataINS_9function0IvEEE3runEv+0x32)[0x7f1d31dc0d52]
> /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1(+0x11bcd)[0x7f1d2ef7dbcd]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f1d352c56db]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f1d355fe88f]
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

--
Janek Kozicki http://janek.kozicki.pl/ |

Revision history for this message
Janek Kozicki (cosurgi) said :
#3

In short: try using SpatialQuickSortCollider

Also, to have a useful backtrace from yade which you didn't compile
yourself but installed it from debian distribution, you have to
install this package:

  libyade-dbgsym python-yade-dbgsym

however a special repository with debug symbols must be enabled:

  deb http://debug.mirrors.debian.org/debian-debug/ stretch-debug main non-free-contrib

Instead of "stretch" put your distribution name. It also works with
devuan, because devuan mirrors most of debian packages.

Janek

Janek Kozicki said: (by the date of Tue, 12 Feb 2019 19:22:35 -0000)

> Question #678494 on Yade changed:
> https://answers.launchpad.net/yade/+question/678494
>
> Status: Open => Answered
>
> Janek Kozicki proposed the following answer:
> To obtain a useful Backtrace please make sure that you have compiled
> yade with -DDEBUG=1, otherwise the backtrace will be useless.
>
> Also on newer linux kernels you might need to run a command:
> echo 0 > /proc/sys/kernel/yama/ptrace_scope ## debug ON
>
> Backtrace:
>
> Successfully delete periodic box!
> Successfully generate shear box!
> DEBUG yade/pkg/common/InsertionSortCollider.cpp:207 action: Resize bounds containers from 400 to 424, will std::sort.
> python: yade/pkg/common/InsertionSortCollider.cpp:223: virtual void InsertionSortCollider::action(): Assertion `(size_t)BB[0].size==2*scene->bodies->size()' failed.
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 0x00007fa8ccece67d in poll () at ../sysdeps/unix/syscall-template.S:84
> 84 ../sysdeps/unix/syscall-template.S: No such file or directory.
> Invalid thread ID: info
>
> Thread 24 (Thread 0x7fa878f0a700 (LWP 11503)):
> #0 0x00007fa8ccea704a in __GI___waitpid (pid=11509, stat_loc=stat_loc@entry=0x7fa878f091f0, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
> #1 0x00007fa8cce2e0ab in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
> #2 0x00007fa8cc5e2a1e in crashHandler (sig=6) at yade/core/main/pyboot.cpp:13
> #3 <signal handler called>
> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
> #5 0x00007fa8cce2342a in __GI_abort () at abort.c:89
> #6 0x00007fa8cce1ae67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7fa8cb4e9478 "(size_t)BB[0].size==2*scene->bodies->size()", file=file@entry=0x7fa8cb4e90c8 "yade/pkg/common/InsertionSortCollider.cpp", line=line@entry=223, function=function@entry=0x7fa8cb4f22e0 <InsertionSortCollider::action()::__PRETTY_FUNCTION__> "virtual void InsertionSortCollider::action()") at assert.c:92
> #7 0x00007fa8cce1af12 in __GI___assert_fail (assertion=assertion@entry=0x7fa8cb4e9478 "(size_t)BB[0].size==2*scene->bodies->size()", file=file@entry=0x7fa8cb4e90c8 "yade/pkg/common/InsertionSortCollider.cpp", line=line@entry=223, function=function@entry=0x7fa8cb4f22e0 <InsertionSortCollider::action()::__PRETTY_FUNCTION__> "virtual void InsertionSortCollider::action()") at assert.c:101
> #8 0x00007fa8ca92e675 in InsertionSortCollider::action (this=0x556bcc023b10) at yade/pkg/common/InsertionSortCollider.cpp:223
> #9 0x00007fa8ca458a42 in Scene::moveToNextTimeStep (this=this@entry=0x556bca0c9d30) at yade/core/Scene.cpp:97
> #10 0x00007fa8ca45bf47 in SimulationFlow::singleAction (this=0x556bca0c9b10) at yade/core/SimulationFlow.cpp:24
> #11 0x00007fa8ca45fa67 in ThreadWorker::callSingleAction (this=0x556bca0c9b10) at yade/core/ThreadWorker.cpp:71
> #12 0x00007fa8ca45cb37 in ThreadRunner::call (this=this@entry=0x556bca1c2d30) at yade/core/ThreadRunner.cpp:52
> #13 0x00007fa8ca45ce78 in ThreadRunner::run (this=0x556bca1c2d30) at yade/core/ThreadRunner.cpp:26
> #14 0x00007fa8ca45eed2 in boost::function0<void>::operator() (this=<optimized out>) at /usr/include/boost/function/function_template.hpp:771
> #15 boost::detail::thread_data<boost::function0<void> >::run (this=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:116
> #16 0x00007fa8c7320116 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0
> #17 0x00007fa8cdaba494 in start_thread (arg=0x7fa878f0a700) at pthread_create.c:333
> #18 0x00007fa8cced7acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
>
>
> We can see that the problem is in InsertionSortCollider with Assertion `(size_t)BB[0].size==2*scene->bodies->size()'
>
> You might want to try a different collider
> https://yade-dev.gitlab.io/trunk/user.html#bo1-functors
> https://yade-dev.gitlab.io/trunk/yade.wrapper.html#collider
>
> https://yade-
> dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.SpatialQuickSortCollider
>
> is suppose to be the safest one.
>
> OTOH, it looks like maybe there is a bug in InsertionSortCollider
> because following lines are in contradiction with each other:
>
> long nBodies=(long)scene->bodies->size();
> ...
> if(BB[0].size!=2*nBodies){
> ... // fix the BB[0].size
> }
> assert((size_t)BB[0].size==2*scene->bodies->size()); // Crash here.
>
> best regards
> Janek
>
>
> Jan Stránský said: (by the date of Tue, 12 Feb 2019 16:32:29 -0000)
>
> > Question #678494 on Yade changed:
> > https://answers.launchpad.net/yade/+question/678494
> >
> > Jan Stránský posted a new comment:
> > Hello,
> > no idea.. for others, output of catchsegv (it seems the problem is around InsertionSortCollider::action)
> > Jan
> >
> > Backtrace:
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(+0x1f0227b)[0x7f1d31ff627b]
> > /usr/lib/x86_64-linux-gnu/libgomp.so.1(GOMP_parallel+0x3f)[0x7f1d294a7ecf]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN21InsertionSortCollider6actionEv+0x3e4)[0x7f1d31ff98a4]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5Scene18moveToNextTimeStepEv+0x4b2)[0x7f1d31dba882]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN14SimulationFlow12singleActionEv+0x33)[0x7f1d31dbdd83]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadWorker16callSingleActionEv+0x4f)[0x7f1d31dc179f]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner4callEv+0x47)[0x7f1d31dbe9b7]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN12ThreadRunner3runEv+0x50)[0x7f1d31dbec90]
> > /usr/lib/x86_64-linux-gnu/yade/libyade.so(_ZN5boost6detail11thread_dataINS_9function0IvEEE3runEv+0x32)[0x7f1d31dc0d52]
> > /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1(+0x11bcd)[0x7f1d2ef7dbcd]
> > /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f1d352c56db]
> > /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f1d355fe88f]
> >
> > --
> > 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 : <email address hidden>
> > Unsubscribe : https://launchpad.net/~yade-users
> > More help : https://help.launchpad.net/ListHelp
>
>
> --
> Janek Kozicki http://janek.kozicki.pl/ |
>
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

--
Janek Kozicki http://janek.kozicki.pl/ |

Can you help with this problem?

Provide an answer of your own, or ask Nicholas Ng for more information if necessary.

To post a message you must log in.