[kepler-dev] Running workflows from command-line

Matt Jones jones at nceas.ucsb.edu
Mon Feb 23 13:04:33 PST 2009


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/extension-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(PtExecuteApplication.java:209)
>        [run]     at
> ptolemy.actor.gui.MoMLApplication._parseArgs(MoMLApplication.java:1024)
>        [run]     at
> ptolemy.actor.gui.PtExecuteApplication._parseArgs(PtExecuteApplication.java:244)
>        [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
>
>



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu                       Ph: 1-907-523-1960
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Kepler-dev mailing list