[MPICH] Redirecting standard/error io
Rusty Lusk
lusk at mcs.anl.gov
Wed Dec 28 17:01:58 CST 2005
From: "David Minor" <david-m at orbotech.com>
Subject: [MPICH] Redirecting standard/error io
Date: Mon, 26 Dec 2005 10:40:34 +0200
> In mpiexiec, is there a way to direct standard input to /dev/null and/or
> a way to direct standard and error output to a file?
>
> David Minor
> Orbotech
>
At least for the mpd version of mpiexec, mpiexec represents the parallel
program in several ways, including handling of stdio.
You can direct stdout in the normal way:
mpiexec -n 3 cpi > cpi.out
Sometimes it is helpful in this situation to label the output by MPI
rank:
mpiexec -l -n 3 cpi > cpi.out
Stderr works similaraly, and is kept separate from stdout.
You can redirect stdin as well:
mpiexec -l -s all -n 3 cat < myfile
or
mpiexec -l -s all -n 3 cat < /dev/null
The '-s' argument describes which processes get stdin. By default, it
is just process 0.
Hope this helps. There is more detail in the User's Guide.
Rusty Lusk
More information about the mpich-discuss
mailing list