The issue here is that PN does not deal well with actors that execute in multiple threads. A composite actor with a PN director will execute in multiple threads (one for each actor).
The limitation in PN is in the way it counts blocked processes to determine whether the system is deadlocked and how to manage buffer sizes. Xiaowen Xin of LLNL made a partial fix, included in 5.0-beta, which made the NondeterministicMerge actor work. But PN within PN still does not work properly...
Edward
At 11:55 AM 5/18/2005 +0200, Erwin De Ley wrote:
Hi,
There have been some remarks in the past about mixing PN-typed composite actors in non-process domains, and that these don't seem to work.
Replies then stated that currently process-type composites can only be used inside process-typed hierarchical models.
But I've tried this (with Ptolemy 4.0.1), and seen the following behaviour:
1- a PN parent model, containing composite actors without own director ("transparent" ?) executes and terminates fine
2- a PN parent model, containing composite actors with an SDF director (and containing SDF-compatible actors) executes and terminates fine
3- a PN parent model, containing composite actors with an PN director does not function
I've attached the sample moml file.
The composite actor contains a simple Ramp, linked to an InteractiveShell, and acts as source for a simple string-length calculation and manipulation.
In case (3-), the InteractiveShell gives me the expected prompt, but the cmd I enter seems not to arrive at the StringLength actor in the parent model...
And the execution remains blocked after that...
Can someone explain what are the semantic differences between cases 1 and 3?
Should case 3 function similarly to case 1, or doesn't this case make sense?
What are the underlying components in the Ptolemy SW architecture that intervene in the communication between PN composites and hierarchies?
Kind regards
Erwin
<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
<entity name="test-composite" class="ptolemy.actor.TypedCompositeActor">
<property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="4.0.1">
</property>
<property name="PN Director" class="ptolemy.domains.pn.kernel.PNDirector">
<property name="_location" class="ptolemy.kernel.util.Location" value="{95, 35}">
</property>
</property>
<property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={232, 253, 815, 518}, maximized=false}">
</property>
<property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
</property>
<property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
</property>
<property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 200.0}">
</property>
<entity name="CompositeActor" class="ptolemy.actor.TypedCompositeActor">
<property name="_location" class="ptolemy.kernel.util.Location" value="{120, 140}">
</property>
<port name="output" class="ptolemy.actor.TypedIOPort">
<property name="output"/>
<property name="_location" class="ptolemy.kernel.util.Location" value="[370.0, 110.0]">
</property>
<property name="_showName" class="ptolemy.kernel.util.SingletonAttribute">
</property>
</port>
<entity name="Ramp" class="ptolemy.actor.lib.Ramp">
<property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="3">
</property>
<doc>Create a sequence of tokens with increasing value</doc>
<property name="_location" class="ptolemy.kernel.util.Location" value="{100, 115}">
</property>
</entity>
<entity name="InteractiveShell" class="ptolemy.actor.lib.gui.InteractiveShell">
<doc>Produce strings from an interactive shell on the screen</doc>
<property name="_location" class="ptolemy.kernel.util.Location" value="{255, 105}">
</property>
</entity>
<relation name="relation" class="ptolemy.actor.TypedIORelation">
</relation>
<relation name="relation2" class="ptolemy.actor.TypedIORelation">
</relation>
<link port="output" relation="relation"/>
<link port="Ramp.output" relation="relation2"/>
<link port="InteractiveShell.input" relation="relation2"/>
<link port="InteractiveShell.output" relation="relation"/>
</entity>
<entity name="StringLength" class="ptolemy.actor.lib.string.StringLength">
<doc>Output the length of an input string</doc>
<property name="_location" class="ptolemy.kernel.util.Location" value="{275, 125}">
</property>
</entity>
<entity name="Scale" class="ptolemy.actor.lib.Scale">
<property name="factor" class="ptolemy.data.expr.Parameter" value="10">
</property>
<property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
<property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="factor">
</property>
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="{400, 105}">
</property>
</entity>
<entity name="Display" class="ptolemy.actor.lib.gui.Display">
<property name="_location" class="ptolemy.kernel.util.Location" value="{515, 85}">
</property>
</entity>
<relation name="relation" class="ptolemy.actor.TypedIORelation">
</relation>
<relation name="relation2" class="ptolemy.actor.TypedIORelation">
</relation>
<relation name="relation3" class="ptolemy.actor.TypedIORelation">
</relation>
<link port="CompositeActor.output" relation="relation3"/>
<link port="StringLength.input" relation="relation3"/>
<link port="StringLength.output" relation="relation2"/>
<link port="Scale.input" relation="relation2"/>
<link port="Scale.output" relation="relation"/>
<link port="Display.input" relation="relation"/>
</entity>
------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]