[MPICH] perl pipe to mpich

William Gropp gropp at mcs.anl.gov
Tue Feb 14 02:35:46 CST 2006


At 12:56 AM 2/14/2006, Sundar J wrote:
>people ,
>            Now suppose a process need to be accessed inside perl then we 
> can open a pipe for it using IPC::open3 module.
>
>the syntax as such will be
>
>open3(*WRITE, *READ, *READ_STDERR, $Child)
>
>where say $Child = "simple.exe" is the process we need to access. Then the 
>child process can be written to using WRITE handler, read from using the 
>READ handler etc.
>
>now suppose i have a mpi compiled executable. To execute that say i am 
>issuing the following command  mpiexec -n 4 simple.exe.
>
>now will i be able to open a pipe for this process. if so how can i do that?

You should be able to do this with $Child = "mpiexec -n 4 simple.exe".  Our 
test suite runs the MPI programs with open (since the test suite doesn't 
need stdin).  If that doesn't work, you may need to fork instead of using 
open (we've had to do this sometimes); the perl man pages warns about 
various problems with the perl open family (particularly on systems whose 
executables end in .exe).

Bill



William Gropp
http://www.mcs.anl.gov/~gropp 




More information about the mpich-discuss mailing list