← Back to team overview

yade-users team mailing list archive

Re: [Question #677084]: manipulate the spheres during running

 

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

    Status: Open => Answered

Chareyre proposed the following answer:
Batch is already multithread, by definition. It thus seems you are nesting
threads into threads.
Still unclear what you are trying to achieve. It should be enough to load()
then run(). No need for python's threading module.

As for why it seems to work in normal mode... it's just puzzling me.
Bruno


Le ven. 28 déc. 2018 00:27, gaoxuesong <question677084@xxxxxxxxxxxxxxxxxxxxx>
a écrit :

> Question #677084 on Yade changed:
> https://answers.launchpad.net/yade/+question/677084
>
>     Status: Answered => Open
>
> gaoxuesong is still having a problem:
> Hi. The thing i want is with the yade-batch mode, when i finish 5000
> iters, i want to reload some previous state which has been saved before. So
> the procedure should be like this,
>     create a new thread, invoke a new function, and execute the O.load()
> demand.
>
> def newThread():
>     if O.time > 3.6:
>         import thread
>         thread.start_new_thread(newRun,())
>
> def newRun():
>     O.pause();O.wait()
>     O.load('./svdir/t3-3.5')
>
> I find this method is ok in usual mode of yade, but failed in batch
> mode.
>
> --
> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
> e.

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