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