[alcf-discuss] Labeling stdout, stderr with rank?

Anthony Chan chan at mcs.anl.gov
Mon Apr 12 21:41:12 CDT 2010


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


More information about the discuss mailing list