<br><font size=2 face="sans-serif">The Blue Gene mpirun has a -label option
that does exactly what you want. Setting the env var MPIRUN_LABEL=1
(or to any value probably) should also do it. See the App Development
redbook. There is a chapter on mpirun that lists all the options
and env vars. The options/vars should also work with mpiexec (which
is really the same cmd).</font>
<br><font size=2 face="sans-serif"><br>
-todd<br>
<br>
-----<br>
Todd Inglett<br>
Blue Gene Product Software Architecture<br>
(507) 253-3617 tinglett@us.ibm.com<br>
</font>
<br>
<br><tt><font size=2>discuss-bounces@lists.alcf.anl.gov wrote on 04/12/2010
10:21:01 PM:<br>
<br>
> [image removed] </font></tt>
<br><tt><font size=2>> <br>
> Re: [alcf-discuss] Labeling stdout, stderr with rank?</font></tt>
<br><tt><font size=2>> <br>
> Peter Messmer </font></tt>
<br><tt><font size=2>> <br>
> to:</font></tt>
<br><tt><font size=2>> <br>
> discuss</font></tt>
<br><tt><font size=2>> <br>
> 04/12/2010 10:21 PM</font></tt>
<br><tt><font size=2>> <br>
> Sent by:</font></tt>
<br><tt><font size=2>> <br>
> discuss-bounces@lists.alcf.anl.gov</font></tt>
<br><tt><font size=2>> <br>
> Please respond to ALCF BG/P discussion list</font></tt>
<br><tt><font size=2>> <br>
> Hi Tim,<br>
> <br>
> Did you try setting the MPIEXEC_PREFIX_DEFAULT (or MPIEXEC_PREFIX_STDOUT
<br>
> or MPI_PREFIX_STDERR) environment variables?<br>
> <br>
> Peter<br>
> <br>
> <br>
> On 4/12/2010 8:41 PM, Anthony Chan wrote:<br>
> ><br>
> > Hi Jeff,<br>
> ><br>
> > There are occasions that it is difficult to modify the source
code<br>
> > to print out the rankID. A typical example is error/assertion<br>
> > message from system libraries like MPI or math library. It<br>
> > is useful for the cqsub/mpirun to prefix rank ID to show where<br>
> > offending message comes from.<br>
> ><br>
> > A.Chan<br>
> ><br>
> > ----- "Jeff Hammond"<jhammond@mcs.anl.gov> wrote:<br>
> ><br>
> >> I'm sorry I cannot answer the question directly, but is it
not<br>
> >> reasonable to label fprintf statements directly?<br>
> >><br>
> >> printf("hello world\n");<br>
> >><br>
> >> becomes<br>
> >><br>
> >> printf("%d: hello world\n",DCMF_Messager_rank());<br>
> >><br>
> >> I imagine you can do this with the preprocessor or a remapping
of<br>
> >> printf itself, although the latter may involve some fun-and-games<br>
> >> with<br>
> >> symbol redefinition at link time.<br>
> >><br>
> >> Best,<br>
> >><br>
> >> Jeff<br>
> >><br>
> >> On Mon, Apr 12, 2010 at 6:01 PM, Tim Tautges<tautges@mcs.anl.gov><br>
> >> wrote:<br>
> >>> Hi all,<br>
> >>> Is there any way to label the .output, .error
files with the rank<br>
> >> they came<br>
> >>> from, producing a separate file for each proc? I've
searched around<br>
> >> in the<br>
> >>> FAQ and elsewhere, but can't find anything. I recall
seeing<br>
> >> somewhere that<br>
> >>> you can use the qsub -O option, and some special character
like %<br>
> >> that gets<br>
> >>> replaced by the rank. I've tried %, but that doesn't
work.<br>
> >>><br>
> >>> Also, I'm using --env MPIRUN_LABEL=1 on my qsub command,
but it's<br>
> >> not<br>
> >>> labeling output by rank like it's supposed to be. Has
anyone else<br>
> >> seen<br>
> >>> this?<br>
> >>><br>
> >>> Thanks.<br>
> >>><br>
> >>> - tim<br>
> >>><br>
> >>> --<br>
> >>> ================================================================<br>
> >>> "You will keep in perfect peace him whose mind is<br>
> >>> steadfast, because he trusts in you."
Isaiah 26:3<br>
> >>><br>
> >>> Tim Tautges
Argonne National Laboratory<br>
> >>> (tautges@mcs.anl.gov)
(telecommuting from UW-Madison)<br>
> >>> phone: (608) 263-8485
1500 Engineering Dr.<br>
> >>> fax: (608) 263-4499
Madison, WI 53706<br>
> >>><br>
> >>> _______________________________________________<br>
> >>> discuss mailing list<br>
> >>> discuss@lists.alcf.anl.gov<br>
> >>> </font></tt><a href=https://lists.alcf.anl.gov/mailman/listinfo/discuss><tt><font size=2>https://lists.alcf.anl.gov/mailman/listinfo/discuss</font></tt></a><tt><font size=2><br>
> >>><br>
> >><br>
> >><br>
> >><br>
> >> --<br>
> >> Jeff Hammond<br>
> >> Argonne Leadership Computing Facility<br>
> >> jhammond@mcs.anl.gov / (630) 252-5381<br>
> >> </font></tt><a href=http://www.linkedin.com/in/jeffhammond><tt><font size=2>http://www.linkedin.com/in/jeffhammond</font></tt></a><tt><font size=2><br>
> >> _______________________________________________<br>
> >> discuss mailing list<br>
> >> discuss@lists.alcf.anl.gov<br>
> >> </font></tt><a href=https://lists.alcf.anl.gov/mailman/listinfo/discuss><tt><font size=2>https://lists.alcf.anl.gov/mailman/listinfo/discuss</font></tt></a><tt><font size=2><br>
> > _______________________________________________<br>
> > discuss mailing list<br>
> > discuss@lists.alcf.anl.gov<br>
> > </font></tt><a href=https://lists.alcf.anl.gov/mailman/listinfo/discuss><tt><font size=2>https://lists.alcf.anl.gov/mailman/listinfo/discuss</font></tt></a><tt><font size=2><br>
> _______________________________________________<br>
> discuss mailing list<br>
> discuss@lists.alcf.anl.gov<br>
> </font></tt><a href=https://lists.alcf.anl.gov/mailman/listinfo/discuss><tt><font size=2>https://lists.alcf.anl.gov/mailman/listinfo/discuss</font></tt></a><tt><font size=2><br>
</font></tt>