Hi Aron,
Thanks for your helpful comments!
On Thu, 2013-04-18 at 15:54 +0100, Aron Ahmadia wrote:
>
> You certainly could do this with a custom handler.
Yup, I'm already setting custom prefixes this way, so I will just
include the rank in there if the application is started in parallel
mode.
> If you set the file access to line-buffered, you shouldn't see
> interlaced output. Unfortunately, support for line-buffering is
> somewhat operating system specific, so you will probably have to test
> this out on whatever environments you are working in.
I see, this was the missing ingredient! I will check this out and
hopefully it will work both on my beowulfs and supercomputers I'm
currently using.
> The common solution on supercomputers, in case you're curious, is to
> create a separate file per rank when profiling/debugging :) On a
> really big run, frequently only some small fraction of all ranks will
> actually write logs, with the majority disabled as you suggested.
Sure, but I'm going to scale this code to millions of cores, and in this
situation just opening the file handles will take light years, so I'd
really like to have a solution for using the same log file for all
ranks.
If I switch from DEBUG to INFO or even WARN, the amount of logging is
going to be very moderate even considering the number of processes, but
still, it's critically important for me to be able to review the traces,
so I'd be unhappy about just skipping logging on most ranks.
I will see if I can post a minimal example to the list once I get it
figured out...
Z.