O.tags['params'] for 2 batchs and 1 save
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello,
I've faced some issue for batch simulation. I have a batch simulation that loads a .yade save from a previous simulation that was also launched in batch mode.
The two batch-mode simulations consider different parameters in their .table. And in the second simulation, O.tags['params'] refers to the parameters of the first batch-mode simulation, while I would like it refers to the parameters of the current simulation..
I'm attaching example scripts "first.py" and "second.py", together with their "first.table" and "second.table" to illustrate. "first.py" will generate a .yade that will be used by "second.py". During the batch execution of "second.py", O.tags['params'] refers to first.table instead of second.table.
It turns out the O.load erases the right O.tags['params']
Do we agree it is a bug or, at least, an indesirable feature ? Would it be possible to not save O.tags['params'] in .yade files ?
Hi Jerome,
in my opinion it is not bug nor indesirable feature. O.load should load
everything what is saved, including O.tags. I think there would be plenty
of situations where you define O.tags, save it and after load you want to
have them. As an extreme, one may complain that after O.load, the bodies
are loaded from previous simulation :-)
what about this as a solution (readParamsFrom Table after O.load)?
###### second.py ####### ####### ####### ####### ####### ##### 'first. yade') able(secondPara m = 'toto') ####### ####### ####### ####### ####### ####### ######
O.load(
readParamsFromT
from yade.params.table import *
print 'In second.py at the end, O.tags[params] =', O.tags['params']
#######
cheers
Jan
2016-06-24 18:27 GMT+02:00 Jérôme Duriez <email address hidden>:
> ** Attachment added: "second.table" /bugs.launchpad .net/yade/ +bug/1596021/ +attachment/ 4689856/ +files/ second. table /bugs.launchpad .net/bugs/ 1596021 /bugs.launchpad .net/yade/ +bug/1596021/ +subscriptions _______ _______ _______ _______ _______ _____ /launchpad. net/~yade- dev /launchpad. net/~yade- dev /help.launchpad .net/ListHelp
>
> https:/
>
> --
> You received this bug notification because you are a member of Yade
> developers, which is subscribed to Yade.
> https:/
>
> Title:
> O.tags['params'] for 2 batchs and 1 save
>
> Status in Yade:
> New
>
> Bug description:
> Hello,
>
> I've faced some issue for batch simulation. I have a batch simulation
> that loads a .yade save from a previous simulation that was also
> launched in batch mode.
>
> The two batch-mode simulations consider different parameters in their
> .table. And in the second simulation, O.tags['params'] refers to the
> parameters of the first batch-mode simulation, while I would like it
> refers to the parameters of the current simulation..
>
> I'm attaching example scripts "first.py" and "second.py", together
> with their "first.table" and "second.table" to illustrate. "first.py"
> will generate a .yade that will be used by "second.py". During the
> batch execution of "second.py", O.tags['params'] refers to first.table
> instead of second.table.
>
> It turns out the O.load erases the right O.tags['params']
>
> Do we agree it is a bug or, at least, an indesirable feature ? Would
> it be possible to not save O.tags['params'] in .yade files ?
>
> To manage notifications about this bug go to:
> https:/
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>