<div dir="ltr">Thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:01 PM, Wozniak, Justin M. <span dir="ltr"><<a href="mailto:wozniak@mcs.anl.gov" target="_blank">wozniak@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<br>
Use: <br><div class="">
<br>
"/bin/bash" "-c" acmd arg @stdout=o<br>
<br>
<br>
</div><div><div class="h5"><div>On 06/26/2014 01:53 PM, Ketan Maheshwari wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi,
<div><br>
</div>
<div>The following T script with app def fails for me:</div>
<div><br>
</div>
<div>
<div>import files;</div>
<div>import io;</div>
<div>import string;</div>
<div><br>
</div>
<div>app (file o) cmd (string acmd, string arg) {</div>
<div> "/bin/bash -c" acmd arg @stdout=o</div>
<div>}</div>
<div><br>
</div>
<div>main {</div>
<div>file output<sprintf("s.txt")> = cmd("echo", "hello");</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>CAUGHT ERROR:</div>
<div>external command failed: /bin/bash -c echo hello</div>
<div> while executing</div>
<div>"error $msg"</div>
</div>
<div>
<div> (procedure "turbine_error" line 6)</div>
<div> invoked from within</div>
<div>"turbine_error "external command failed: $cmd $args""</div>
<div> (procedure "turbine::exec_external" line 16)</div>
<div> invoked from within</div>
<div>"turbine::exec_external "/bin/bash -c" [ dict create "stdout" ${v:__filename:o} ] ${v:acmd} ${v:arg}"</div>
<div> (procedure "cmd-app-leaf0" line 17)</div>
<div> invoked from within</div>
<div>"cmd-app-leaf0 0 {7.0} 1 {1} {4} {file 7 is_mapped 1}"</div>
<div>Turbine worker task error in: cmd-app-leaf0 0 {7.0} 1 {1} {4} {file 7 is_mapped 1}</div>
<div> invoked from within</div>
<div>"c::worker_loop $WORK_TYPE(WORK)"</div>
<div> (procedure "worker" line 28)</div>
<div> invoked from within</div>
<div>"worker $rules $startup_cmd"</div>
<div> (procedure "enter_mode_unchecked" line 5)</div>
<div> invoked from within</div>
<div>"enter_mode_unchecked $rules $startup_cmd"</div>
<div> (procedure "enter_mode" line 10)</div>
<div> invoked from within</div>
<div>"enter_mode $rules $startup_cmd "</div>
<div>CALLING adlb::abort</div>
<div>ADLB_Abort(1)</div>
<div>MPI_Abort(1)</div>
<div>application called MPI_Abort(MPI_COMM_WORLD, 1) - process 1</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I want to run an arbitrary command with arbitrary args via /bin/bash or /bin/sh.</div>
<div><br>
</div>
<div>Any suggestions?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ketan</div>
</div>
<br>
<fieldset></fieldset> <br>
</div></div><div class=""><pre>_______________________________________________
ExM-user mailing list
<a href="mailto:ExM-user@lists.mcs.anl.gov" target="_blank">ExM-user@lists.mcs.anl.gov</a>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a>
</pre>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Justin M Wozniak
</pre>
</font></span></div>
</blockquote></div><br></div>