bproc question In-reply-to: Your message of "Wed, 07 Mar 2001

Dan Smith dcs@iastate.edu
Wed, 07 Mar 2001 22:07:52 CST


Thanks!  This explains a lot, actually.  I have another question.  Is it
possible to have a program that has been moved to a slave node (via
bproc_execmove(), for instance) send it's output to a file on the slave
node's local disk using a simple redirect?  I want to be able to start a
program on different nodes and have them each redirect there output into
files on their own local disks.  Better yet, can I also feed them input with
redirects from files that are local to each slave?  Am I making any sense?  
Thanks for any advice you can give.

Dan

>This is the expected results.  bproc_execmove() works much like
>exec() in that it will only return if it fails.  If it succeeds, the
>current process is replaced by the process you are execing.  Thus,
>this program is no longer running so your last printf can never be
>executed.
>bproc_execmove is actually very similar to bproc_rexec.  The main
>difference is that with rexec, it tries to run a program located on the
>remote node.  With execmove, it execs the process locally, and
>immediately moves it to the remote node.
>
>If you want to keep your spawning process running, I'd suggest you
>either fork() locally, then call bproc_execmove(), or if you want
>rexec() functionality, use rfork() then a standard exec() call.
>
>
>Jag


---
Daniel C. Smith                  |    Iowa State University
Graduate Assistant               |    Department of Physics and Astronomy     
dcs@iastate.edu                  |    Ames, IA 50011