Hey Seb,
If you go for the first syntax where you copy the whole folder as a resource to
the SystemExecTask, then you need to update the command line to reflect the
actual path to the script:
bash emergence2/script.sh
The whole emergence2 folder is copied in the task's working directory so
script.sh is not in the current directory but under emergence2
Cheers
J.
On 14 November 2016 10:35:57 GMT+00:00, sebastien rey coyrehourcq
<[email protected]> wrote:
>Hi,
>
>
>
>I try to run a simple workflow which first replace ${value} into some
>xml
>template file (parameters.xml),
>
>and then copy this file into one location in my workdirectory (for
>example
>**/emergence2/models/parameters/**)
>
>
>
>The templatefileTask work well, but i have some problem to understand
>how the
>SystemExecTask works.
>
>
>
>I need to embark all the files into **/emergence2/ folder **which**
>**contain
>scripts.sh and model to run (the second command for my execSystemTask
>after
>script.sh which copy the file at the good place) ,** **but the task
>only works
>with **resources += workDirectory / "emergence2/scripts.sh"** and not
>with
>**resources += workDirectory / "emergence2" **
>
>
>
>The **bash script.sh** only display the content of the current
>directory at
>this moment, so it works.
>
>
>
>**The workflow : **
>
>
>
>val fileoutput = Val[File]
>val neighboor = Val[String]
>val output = Val[String]
>val error = Val[String]
>
>val templateTask =
> TemplateFileTask(workDirectory / "parameters.xml",fileoutput) set (
> inputs += neighboor,
> neighboor:= "RandomPairwise"
> )
>
>val scriptTask =
> SystemExecTask("bash script.sh ${fileoutput}") set (
> inputs += fileoutput,
> resources += workDirectory / "emergence2/", **//DONT WORKS**
>
> resources += workDirectory / "emergence2/script.sh", **//WORKS**
>
> stdOut := output,
> stdErr := error
> )
>
>templateTask -- scriptTask hook ToStringHook()
>
>
>
>**The error : **
>
>
>
>org.openmole.core.exception.InternalProcessingError: Error for context
>values
>in SystemExecTask@497205009
>{fileoutput=/home/reyman/.openmole/Dunwich/.tmp/c8f5a347-1de3-43ec-
>aa74-ee2e2fa53afa/executionf38eb62e-844f-403f-a971-934961a362ba/parameters
>.xml557c4e5c-cac4-458b-a5bb-7a9cc2901b6a.tmp,
>oMSeed=695454068716827435}
>at
>org.openmole.core.workflow.tools.InputOutputCheck$class.perform(InputOutput
>Check.scala:95)
>at
>org.openmole.plugin.task.systemexec.SystemExecTask.perform(SystemExecTask.s
>cala:71)
>at org.openmole.core.workflow.task.Task$class.perform(Task.scala:39)
>at
>org.openmole.plugin.task.systemexec.SystemExecTask.perform(SystemExecTask.s
>cala:71)
>at org.openmole.core.workflow.job.MoleJob.perform(MoleJob.scala:101)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor$$anonfun$1$$anonfu
>n$apply$1.apply(LocalExecutor.scala:85)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor$$anonfun$1$$anonfu
>n$apply$1.apply(LocalExecutor.scala:64)
>at scala.collection.immutable.List.foreach(List.scala:381)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor$$anonfun$1.apply(L
>ocalExecutor.scala:64)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor$$anonfun$1.apply(L
>ocalExecutor.scala:61)
>at
>org.openmole.core.output.OutputManager$.withStreamOutputs(OutputManager.sca
>la:99)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor.withRedirectedOutp
>ut(LocalExecutor.scala:136)
>at
>org.openmole.core.workflow.execution.local.LocalExecutor.run(LocalExecutor.
>scala:61)
>at java.lang.Thread.run(Thread.java:745)
>**Caused by: org.openmole.core.exception.InternalProcessingError: Error
>executing command"}:
>[bash script.sh /home/reyman/.openmole/Dunwich/.tmp/c8f5a347-1de3-43ec-
>aa74-ee2e2fa53afa/executionf38eb62e-844f-403f-a971-934961a362ba/parameters
>.xml557c4e5c-cac4-458b-a5bb-7a9cc2901b6a.tmp] return code was not 0 but
>127**
>
>**
>**
>
>**Any idea ?**
>
>
>
>\---
>
>Sébastien Rey Coyrehourcq
>
>Research Engineer, BAP E, UMR IDEES
>
>Sent from [Nylas N1](https://nylas.com/n1?ref=n1), the extensible, open
>source
>mail client.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>OpenMOLE-users mailing list
>[email protected]
>http://fedex.iscpif.fr/mailman/listinfo/openmole-users
--
Jonathan Passerat-Palmbach, PhD
Research Associate
Department of Computing
Imperial College London
South Kensington Campus
Huxley Building - room 344
180 Queen's Gate
London SW7 2AZ_______________________________________________
OpenMOLE-users mailing list
[email protected]
http://fedex.iscpif.fr/mailman/listinfo/openmole-users