[kepler-dev] how to enable 'listen to actor' without GUI?

David Welker david.v.welker at gmail.com
Thu Sep 10 19:14:52 PDT 2009


I think that listening to an actor is an important enough concrete use  
case that Christopher's abstract and I think somewhat dubious claim  
about scalability should be overridden. I am not sure exactly when  
adding a particular command-line option is the command "that breaks  
the camel's back" but I think if adding command-line options is not  
scalable, that points to a serious design flaw. I do not see why an  
understandable and consistent pattern cannot be established such that  
adding new command-line options is not intellectually too complex.

Furthermore, I think that the solution that Christopher proposes is  
too complex, and if used would not be very maintainable.

David

On Sep 10, 2009, at 7:37 PM, Christopher Brooks wrote:

> Hi Jianwu,
> You could just search for the code that invokes listen to actor,
> but the problem is that invoking the method requires determining
> the actor to which to listen.
>
> I agree that my solution is more complex, but adding more and
> more command line options is not very scalable after a certain
> point.
>
> _Christopher
>
>
> Jianwu Wang wrote:
>> Hi Christopher,
>>   Thanks a lot for you help. The solution is more complex than I  
>> expected. I'll try to work it around.
>> Best wishes
>> Sincerely yours
>> Jianwu Wang
>> jianwu at sdsc.edu
>> http://users.sdsc.edu/~jianwu/
>> Scientific Workflow Automation Technologies (SWAT) Laboratory
>> San Diego Supercomputer Center University of California, San Diego
>> San Diego, CA, U.S.A.
>> Christopher Brooks wrote:
>>> Hi Jianwu,
>>> How I track these down is to search the ptII repository for the
>>> menu string that corresponds with the functionality in which you
>>> are interested.
>>>
>>> To my knowledge, we don't currently support enabling 'listen to
>>> actor' from the command line.
>>>
>>> Instead of adding yet another command line argument, it might be  
>>> worth
>>> worth using Jacl to invoke Java commands.
>>>
>>> $PTII/bin/ptjacl foo.tcl workflow.xml
>>> would invoke foo.tcl which could then read in workflow.xml, set up
>>> any listeners and then run the model.
>>>
>>> For example, if foo.tcl contains:
>>>
>>>  java::new ptolemy.moml.MoMLSimpleApplication $argv
>>>
>>> Then
>>> $PTII/bin/ptjacl foo.tcl $PTII/ptolemy/actor/lib/test/auto/Ramp1.xml
>>> will invoke the model.
>>>
>>> It is not that difficult to take control of execution, if foo.tcl  
>>> contained
>>>
>>>
>>> set parser [java::new ptolemy.moml.MoMLParser]
>>> set toplevel [java::cast ptolemy.actor.TypedCompositeActor  
>>> [$parser parseFile $argv]]
>>> set manager [java::new ptolemy.actor.Manager \
>>>            [$toplevel workspace] "manager"]
>>> $toplevel setManager $manager
>>> $manager execute
>>>
>>> then the model is parsed, a manager created and executed.
>>>
>>> _Christopher
>>>
>>> Jianwu Wang wrote:
>>>> Hi there,
>>>>
>>>>   With Kepler GUI, we can use right-click item 'listen to actor'  
>>>> to get the execution debug info of this actor. Now I have to run  
>>>> a workflow in batch mode, e.g. kepler.sh -runwf -nogui -nocache  
>>>> workflow.xml. Do we support the same function like 'listen to  
>>>> actor' when executing workflow in batch mode? Do I need change  
>>>> some configuration item of Kepler/Ptolemy configuration files to  
>>>> enable that? Thanks a lot!
>>>>
>>>
>
> -- 
> Christopher Brooks (cxh at eecs berkeley edu) 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 (W-F) 510.655.5480
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev



More information about the Kepler-dev mailing list