← Back to team overview

yade-users team mailing list archive

Re: [Question #694054]: Segmentation fault (core dumped) Engines

 

Question #694054 on Yade changed:
https://answers.launchpad.net/yade/+question/694054

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I am very new to yade

welcome :-)

> I am just suggesting that it is in the the FIRST engine

why?

> somehow track the problem that occurs the segmentation fault

try to run
catchsegv yade script.py
or simply how you run yade, but put "catchsegv" before and provide the output

> what did I do wrong

probably is not related to the problem, but:

> O.engines = O.engines + [...]

while it might be perfectly OK, I consider it a "dangerous" operation (especially if slicing is involved).
Especially before any step/run (like this case) and no if condition, there is no reason not to put the engines directly inside the original O.engines = [...] definition.
Just be careful while modifying the O.engines

> O.engines=O.engines + [PyRunner(command='move()',iterPeriod = 1,firstIterRun=2000,iterLast=4200)]
> def move():
>  if O.iter > 2000 :
>   O.engines = O.engines + [TranslationEngine(ids=vane,translationAxis=(1,0,0),velocity=.3)]

like here. You are adding 2200 instances of "the same" TranslationEngine to O.engines, probably not what you want..
Adding one (possibly dead initially) at the very beginning and modifying its dead attribute (or other attributes as well) should be enough.

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.