[ExM Users] app fails

Justin M Wozniak wozniak at mcs.anl.gov
Thu Jun 26 14:14:44 CDT 2014


bash -c requires one argument:

   "/bin/bash" "-c" (acmd+" "+arg)  @stdout=o

On 06/26/2014 02:07 PM, Ketan Maheshwari wrote:
> Thanks!
>
>
> On Thu, Jun 26, 2014 at 2:01 PM, Wozniak, Justin M. 
> <wozniak at mcs.anl.gov <mailto:wozniak at mcs.anl.gov>> wrote:
>
>
>     Use:
>
>      "/bin/bash"  "-c" acmd arg @stdout=o
>
>
>     On 06/26/2014 01:53 PM, Ketan Maheshwari wrote:
>>     Hi,
>>
>>     The following T script with app def fails for me:
>>
>>     import files;
>>     import io;
>>     import string;
>>
>>     app (file o) cmd (string acmd, string arg) {
>>       "/bin/bash -c" acmd arg @stdout=o
>>     }
>>
>>     main {
>>     file output<sprintf("s.txt")> = cmd("echo", "hello");
>>     }
>>
>>
>>     CAUGHT ERROR:
>>     external command failed: /bin/bash -c echo hello
>>         while executing
>>     "error $msg"
>>         (procedure "turbine_error" line 6)
>>         invoked from within
>>     "turbine_error "external command failed: $cmd $args""
>>         (procedure "turbine::exec_external" line 16)
>>         invoked from within
>>     "turbine::exec_external "/bin/bash -c" [ dict create "stdout"
>>     ${v:__filename:o} ] ${v:acmd} ${v:arg}"
>>         (procedure "cmd-app-leaf0" line 17)
>>         invoked from within
>>     "cmd-app-leaf0 0 {7.0} 1 {1} {4} {file 7 is_mapped 1}"
>>     Turbine worker task error in: cmd-app-leaf0 0 {7.0} 1 {1} {4}
>>     {file 7 is_mapped 1}
>>         invoked from within
>>     "c::worker_loop $WORK_TYPE(WORK)"
>>         (procedure "worker" line 28)
>>         invoked from within
>>     "worker $rules $startup_cmd"
>>         (procedure "enter_mode_unchecked" line 5)
>>         invoked from within
>>     "enter_mode_unchecked $rules $startup_cmd"
>>         (procedure "enter_mode" line 10)
>>         invoked from within
>>     "enter_mode $rules $startup_cmd "
>>     CALLING adlb::abort
>>     ADLB_Abort(1)
>>     MPI_Abort(1)
>>     application called MPI_Abort(MPI_COMM_WORLD, 1) - process 1
>>
>>
>>     I want to run an arbitrary command with arbitrary args via
>>     /bin/bash or /bin/sh.
>>
>>     Any suggestions?
>>
>>     Thanks,
>>     Ketan
>>
>>
>>     _______________________________________________
>>     ExM-user mailing list
>>     ExM-user at lists.mcs.anl.gov  <mailto:ExM-user at lists.mcs.anl.gov>
>>     https://lists.mcs.anl.gov/mailman/listinfo/exm-user
>
>     -- 
>     Justin M Wozniak
>
>

-- 
Justin M Wozniak

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20140626/979b85ec/attachment-0001.html>


More information about the ExM-user mailing list