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

Christopher Brooks cxh at eecs.berkeley.edu
Thu Sep 10 18:37:30 PDT 2009


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


More information about the Kepler-dev mailing list