-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLIC: Rank count and list formatting #1420
Comments
axom/src/axom/slic/streams/GenericOutputStream.cpp Lines 97 to 103 in 6f5eaa3
You should use axom/src/axom/slic/streams/SynchronizedStream.cpp Lines 145 to 152 in 6f5eaa3
I'm not too sure where this is coming from. @white238, could it be this line here in Lumberjack (line 58)? axom/src/axom/lumberjack/Message.cpp Lines 42 to 61 in 6f5eaa3
|
I had tried the |
I see, that's a good point. You likely would see some costs for those MPI routines. Alternatively, if you know for sure the For example, in this Lumberjack format string example: axom/src/axom/slic/examples/basic/lumberjack_logging.cpp Lines 41 to 58 in 6f5eaa3
You can instead hardcode the rank and rank count:
EDIT: Essentially, you can use these constructors with the axom/src/axom/slic/streams/GenericOutputStream.hpp Lines 58 to 82 in 6f5eaa3
|
This is an interesting point. The only formatting keyword I generally pass to Slic is Perhaps to enforce rank=0, I can check which stream is used when I format my messages and override the |
@white238 had some suggestions on point 2) with the trailing dots (please correct me if I am misremembering):
|
@gberg617 Closing this issue for now. Feel free to re-open this issue/open a new issue if the problem persists! |
I'm trying to write to a log file using both GenericOutputStream (for messages from the root rank), and LumberjackStream (for messages from another rank that might need to be filtered). Traditionally, the formatting of this log file would look something like this:
[INFO ][2024/09/20 18:18:57][ 0][ 0][0.000000e+00] Message from root rank
[INFO ][2024/09/20 18:18:57][ 2][ 0][2.200000e-02] Message from rank 2
The number in the third pair of square brackets above indicates the rank that creates the message. Messages that are filtered typically print only the first rank.
There are two issues I'm encountering trying to format this:
<RANK>
keyword will just be empty. For all of my applications, I prefer the rank to always print "0", and rank count to be "1" so that it has consistent formatting. Is there a way to override this formatting? Or would you recommend that I create my own stream class to do this?Any guidance on this would be greatly appreciated!
The text was updated successfully, but these errors were encountered: