[kepler-dev] Running workflows from command-line

David Welker david.v.welker at gmail.com
Mon Feb 23 13:37:04 PST 2009


Hi Norbert,

I have modified the run-workflow commands so that the path to the 
workflow can now be either an absolute path or relative to the 
build-area directory (rather than relative to the <kepler.modules> 
directory). The reason for the latter option is to make it easy to use 
auto-completion from the command-line.

With respect to your question about setting system properties into the 
JVM, that can be done by adding a *.properties file to the 
resources/system.properties folder of to your module. I just noticed 
that this feature was not documented in the build instructions. You can 
read updated instructions in the build for both setting Java system 
properties and for the run-workflow commands at the following link:

https://dev.kepler-project.org/developers/teams/build/documentation/build-system-instructions#setting-system-properties

David

> 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
>   



More information about the Kepler-dev mailing list