[kepler-users] Sequence to Array problem

Christopher Brooks cxh at eecs.berkeley.edu
Fri Jan 22 08:19:31 PST 2010


Hi Tomasz,
Edward Lee took a look at this problem yesterday and it appears
to be an bug in the DDFDirector.

We did fix one bug in SequenceToArray where the arrayLength
PortParameter now has arrayLength.update() called in prefire()
instead of fire().  The way PortParameters work is that
update() should be called once during an iteration.

Getting back to DDFDirector, it looks like what is happening
is that when the Const actor is analyzed to determine if it
is ready to fire, the downstream actors are also analyzed
to see if they are enabled.  Unfortunately, it seems like
if the enabled state of the downstream actors is changing,
then the DDFDirector is not noticing?

It also appears that in this context the notion of an iteration
in DDFDirector is not deterministic in this implementation.
We think that the issue has to do with firingCountLimit in the Const
being set to 1.

The attached model is similar to your sta-1.xml except with
the following changes:
* Const.firingCountLimit was changed from 1 to NONE
* In the Display actor, a parameter named requiredFiringsPerIteration
   was added and set to 1
* I set the number of iterations in the DDFDirector to 1.
The model now behaves properly when the Const is changed from
three elements to two.

I have a test case checked in to the nightly build that illustrates
the problem, so eventually it should be fixed.

_Christopher


On 1/20/10 12:36 PM, Christopher Brooks wrote:
> Hi Tomasz,
> The problem is that in sta-1.xml, after running with
> an array of three elements, and then changing the Const
> to an array of two elements, the SequenceToArray actor
> is not being enabled.
>
> The issue seems to be with the arrayLength PortParameter
> of SequenceToArray.
>
> If I animate execution, then I can see that the ArrayToSequence
> is firing before the ArrayLength actor. It appears that
> the SequenceToArray actor is not being enabled after the arrayLength
> gets updated.
>
> I tried to create a regular model that illustrated this bug
> by using a Sequence actor instead of a Const but could not replicate
> the bug.
>
> However, I was able to create a Tcl test that reads in the model, runs
> it, checks the output, changes the Const and then runs the model again.
>
> I've included the Ptolemy model that is used in the test. Note that
> the model writes to stdout for testing purposes.
>
> I'll see if I can take a look at this with Edward.
>
> _Christopher
>
>
>
>
> On 1/20/10 2:17 AM, Tomasz Żok wrote:
>> Hi,
>>
>> I'd also like to post the simplest example workflows showing exactly
>> when this
>> bug occurs.
>>
>> In the attachment you can find sta-1.xml and sta-2.xml. Both workflows
>> produce
>> an array out of set of tokens.
>>
>> Please load sta-1.xml and run it. You will see {"aaa", "bbb", "ccc"}
>> in the
>> display. Right next after this execution, delete the token "ccc" from the
>> input data and run the workflow. You will get no output at all.
>>
>> In the sta-2.xml do just the same steps. But in this case, you will
>> correctly
>> see {"aaa", "bbb", "ccc"} and later {"aaa", "bbb"}
>>
>> Both workflows should act the same, but only the second one works
>>
>> Regards,
>> Tomek
>>
>>
>>
>>
>> _______________________________________________
>> Kepler-users mailing list
>> Kepler-users at kepler-project.org
>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>
>
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sta-3.xml
Type: text/xml
Size: 26266 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20100122/7d38e14e/attachment.xml>


More information about the Kepler-users mailing list