← Back to team overview

yade-users team mailing list archive

[Question #152385]: Can not run the old code in the new version even if changed something following the instruction

 

New question #152385 on Yade:
https://answers.launchpad.net/yade/+question/152385

Dear All,

I can run my code well in 0.5 version. But if I decrease the strain rate applying the triaxial load, the "segmentation fault" will be appeared and stop the modeling. I see the new version that is 0.6.2, have already solved the problem looks like that the same message stop the modeling. I think maybe my problem can also be solved through changed the version of Yade. Then I installed the new version 0.60.2 instead of the old version 0.50. And I modified my python code following the error reminder. But the "segmentation fault" also appear even through I run the code that can run well in the old version. The process is listed as follow:

jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `yeascu'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 48, in <module>
    spheres=regularHexa_J(pack.inAlignedBox((-.25*specimenLength,-.05*specimenLength,-.25*specimenLength),(.25*specimenLength,.05*specimenLength,0.25*specimenLength)),radius=sphereRadius,gap=0.0,material=concreteId)
NameError: name 'specimenLength' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `esacks'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 50, in <module>
    spheres=regularHexa_J(pack.inAlignedBox((-.25*specimenLength,-.05*specimenLength,-.25*specimenLength),(.25*specimenLength,.05*specimenLength,0.25*specimenLength)),radius=sphereRadius,gap=0.0,material=concreteId)
TypeError: can't multiply sequence by non-int of type 'float'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ 
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `ucssye'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 50, in <module>
    spheres=regularHexa_J(pack.inAlignedBox((-.25*0.1,-.05*0.1,-.25*0.1),(.25*0.1,.05*0.1,0.25*0.1)),radius=sphereRadius,gap=0.0,material=concreteId)
  File "16-09-re-3d.py", line 33, in regularHexa_J
    a=2*radius+gap
TypeError: can only concatenate tuple (not "float") to tuple
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `kcaesy'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 113, in <module>
    [Ip2_2xCohFrictMat_CohFrictPhys(setCohesionNow=False,setCohesionOnNewContacts=True,normalCohesion=40e3,shearCohesion=40e3)],
AttributeError: No such attribute: shearCohesion.
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `aduksy'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 113, in <module>
    [Ip2_2xCohFrictMat_CohFrictPhys(setCohesionNow=False,setCohesionOnNewContacts=True,normalAdhesion=40e3,shearAdhesion=40e3)],
AttributeError: No such attribute: normalAdhesion.
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `kecyas'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.py:114: DeprecationWarning: Class `Law2_ScGeom_CohFrictPhys_ElasticPlastic' was renamed to (or replaced by) `Law2_ScGeom_CohFrictPhys_CohesionMoment', update your code! (you can run 'yade --update script.py' to do that automatically)
/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.py:114: DeprecationWarning: Class `InteractionDispatchers' was renamed to (or replaced by) `InteractionLoop', update your code! (you can run 'yade --update script.py' to do that automatically)
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 119, in <module>
    SnapshotEngine(iterPeriod=200,fileBase='/tmp/12_08_c-',viewNo=0),
NameError: name 'SnapshotEngine' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `csuaky'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.py:114: DeprecationWarning: Class `Law2_ScGeom_CohFrictPhys_ElasticPlastic' was renamed to (or replaced by) `Law2_ScGeom_CohFrictPhys_CohesionMoment', update your code! (you can run 'yade --update script.py' to do that automatically)
/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.py:114: DeprecationWarning: Class `InteractionDispatchers' was renamed to (or replaced by) `InteractionLoop', update your code! (you can run 'yade --update script.py' to do that automatically)
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `caseuy'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade-cleanComp060", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 114, in <module>
    [LLaw2_ScGeom_CohFrictPhys_CohesionMoment()]
NameError: name 'LLaw2_ScGeom_CohFrictPhys_CohesionMoment' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `ykecsu'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.py:114: DeprecationWarning: Class `InteractionDispatchers' was renamed to (or replaced by) `InteractionLoop', update your code! (you can run 'yade --update script.py' to do that automatically)
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: ---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)

/home/jiaoliqing/YADE/lib/yade-cleanComp060/py/yade/__init__.pyc in refreshEvent(self)
    187         def yzxSlot(self): self.setViewAxes((-1,0,0),(0,0,1))
    188         def zxySlot(self): self.setViewAxes((0,-1,0),(1,0,0))
--> 189         def refreshEvent(self):
    190                 self.refreshValues()
    191                 self.activateControls()

KeyboardInterrupt: 

Do you really want to exit ([y]/n)? 
Yade: normal exit.
Terminated
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `ceuykd'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 10567 WARN  yade.Engine /home/jiaoliqing/yade-0.60.2/pkg/common/Collider.cpp:41 findBoundDispatcherInEnginesIfNoFunctorsAndWarn: Collider.boundDispatcher had no functors defined, while there was a BoundDispatcher found in O.engines. Since version 0.60 (r2396), Collider has boundDispatcher integrated in itself; separate BoundDispatcher should not be used anymore. For now, I will fix it for you, but change your script! Where it reads e.g.

	O.engines=[...,
		BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
		InsertionSortCollider(),
		...
	]

it should become

	O.engines=[...,
		InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
		...
	]

instead.
python: malloc.c:4628: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.
Segmentation fault
jiaoliqing@ubuntu:~/YADE/bin$ yade-cleanComp060 16-09-re-3d.py
Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `daeusy'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: Segmentation fault

May I have your help? Could you explain that why the segmentation fault will appear when I dwindle the loading rate? And how to solve this problem? Thank you!
Looking forward to your replay!

Best Regards
Liqing

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.