[kepler-dev] Running workflows from command-line

Podhorszki, Norbert pnorbert at ornl.gov
Mon Feb 23 13:47:18 PST 2009


Matt,

I suppose, conceptually it should still work as I could modify my own
individualistic and specific install and start scripts to install (a subset
of) Kepler/Core into a specific directory and run a workflow from command
line. 
That runs the ptolemy MomlSimpleApplication directly and does not use the
Run.java and loader of Kepler. Also it installs the jars from all modules'
lib/jar into one directory...

So I am a bit afraid of slowly becoming hopelessly outdated being stuck to
those scripts and face big problems in the future when I cannot hammer my
Kepler installation into a runnable shape anymore.

However, it runs my tiny test workflow (33ms) in 1.5. seconds including
loading Kepler. I like that.

Norbert

On 2/23/09 4:04 PM, "Matt Jones" <jones at nceas.ucsb.edu> wrote:

> For the 1.0.0 release Dan Crawl did a lot of work on getting the
> command-line version of Kepler to work from a bash script with and
> without the GUI and with and without the hsql cache.  Has the new
> build broken this, or is it still a viable way of calling kepler from
> the command line?  If not, I think it should be a high priority fix so
> we don't regress from the functionality we had for 1.0.0.
> 
> Matt
> 
> On Mon, Feb 23, 2009 at 11:18 AM, Norbert Podhorszki <pnorbert at ornl.gov>
> wrote:
>> Hi Sean,
>> 
>> Thanks, this fixed it.
>> However, I have some other needs:
>> 
>> the workflow is located somewhere else, and currently (with old Kepler) I
>> ran it from that directory. I mean, I start up Kepler from some alien
>> directory, not from Kepler's home. I need to be able to either specify a
>> relative path to current dir, or an absolute path to find the workflow. None
>> of this works with the current ant run target.
>> I need to pass some environment variables to jvm for the workflow use (e.g.
>> -DKEPLER_PWD_INPUT_METHOD=STDIN). How can I do that with the new runner? If
>> you tell me other ways to let some java code inside Kepler get an
>> information which is created at the launch of the workflow, I may convert.
>> 
>> Thanks
>> Norbert
>> 
>> 
>> On 2/23/09 2:52 PM, "Sean Riddle" <swriddle at gmail.com> wrote:
>> 
>> The problem is that ant is interpreting your workflow argument as an ant
>> target. The proper way to pass that argument would be as follows:
>> 
>> ant run-workflow-no-gui -Dworkflow=TestIfKeplerCanStartUp.xml
>> 
>> It's a bit tedious, but that's the way ant expects it. Oh, and as it's
>> written now, the workflow's path should be given relative to the main Kepler
>> directory (the parent of build-area).
>> 
>> - Sean
>> 
>> 
>> On Feb 23, 2009, at 9:24 AM, Norbert Podhorszki wrote:
>> 
>> Hi,
>> 
>>  I have checked out and compiled kepler-trunk according to
>> https://dev.kepler-project.org/developers/teams/build/systems/build-system/ex
>> tension-build-system
>>  I need to run workflows from command-line, without gui. The build xml
>> contains a target exactly for this, however, this does not work:
>> 
>>  podhorszki:~/Kepler/kepler/modules/build-area pnb$ ant run-workflow-no-gui
>> TestIfKeplerCanStartUp.xml
>>  Buildfile: build.xml
>> 
>>  run-workflow-no-gui:
>>        [run] Command failed: java.lang.ArrayIndexOutOfBoundsException: 0
>>        [run] java.lang.ArrayIndexOutOfBoundsException: 0
>>        [run]     at
>> ptolemy.moml.MoMLSimpleApplication.main(MoMLSimpleApplication.java:208)
>>        [run]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>>        [run]     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        [run]     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
>> java:25)
>>        [run]     at java.lang.reflect.Method.invoke(Method.java:585)
>>        [run]     at org.kepler.loader.Kepler.load(Kepler.java:207)
>>        [run]     at org.kepler.loader.Kepler.load(Kepler.java:230)
>>        [run]     at org.kepler.loader.Kepler.main(Kepler.java:143)
>>        [run]     at org.kepler.core.loader.Loader.main(Loader.java:86)
>> 
>>  BUILD FAILED
>>  Target "TestIfKeplerCanStartUp.xml" does not exist in the project "kepler".
>> 
>>  Total time: 7 seconds
>> 
>> It does not even starts up with gui:
>> 
>>  podhorszki:~/Kepler/kepler/modules/build-area pnb$ ant run-workflow
>> TestIfKeplerCanStartUp.xml
>>  Buildfile: build.xml
>> 
>>  run-workflow:
>>        [run] java.lang.Exception: Failed to parse "-conf
>> ptolemy/configs/kepler/ConfigGUIAndCache.xml"
>>        [run]     at
>> 
ptolemy.actor.gui.MoMLApplication.throwArgsException(MoMLApplication.java:584>>
)
>>        [run]     at
>> ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:245)
>>        [run]     at
>> ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:155)
>>        [run]     at
>> ptolemy.actor.gui.PtExecuteApplication.<init>(PtExecuteApplication.java:106)
>>        [run]     at
>> ptolemy.actor.gui.PtExecuteApplication.main(PtExecuteApplication.java:149)
>>        [run]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>>        [run]     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        [run]     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
>> java:25)
>>        [run]     at java.lang.reflect.Method.invoke(Method.java:585)
>>        [run]     at org.kepler.loader.Kepler.load(Kepler.java:207)
>>        [run]     at org.kepler.loader.Kepler.load(Kepler.java:230)
>>        [run]     at org.kepler.loader.Kepler.main(Kepler.java:143)
>>        [run]     at org.kepler.core.loader.Loader.main(Loader.java:86)
>>        [run] Caused by: java.lang.Exception: No model specified.
>>        [run]     at
>> ptolemy.actor.gui.PtExecuteApplication._createEmptyConfiguration(PtExecuteApp
>> lication.java:209)
>>        [run]     at
>> ptolemy.actor.gui.MoMLApplication._parseArgs(MoMLApplication.java:1024)
>>        [run]     at
>> ptolemy.actor.gui.PtExecuteApplication._parseArgs(PtExecuteApplication.java:2
>> 44)
>>        [run]     at
>> ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:215)
>>        [run]     ... 11 more
>> 
>>  BUILD FAILED
>>  /Users/pnb/Kepler/kepler/modules/build-area/build.xml:44:
>> /Users/pnb/Kepler/kepler/modules/build-area/build.xml:44: Java returned: 1
>> 
>> 
>>  Had anyone success running workflows from command-line?
>> 
>>  Thanks
>>  Norbert
>> 
>> 
>>    Norbert Podhorszki
>>    ------------------------------------------
>>    Scientific Computing Group
>>    National Center for Computational Sciences
>>    Oak Ridge National Laboratory
>>    Phone: (865) 574-7159
>> 
>> 
>>   _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at kepler-project.org
>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>> 
>> 
>> 
>> _______________________________________________
>> 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