-
Notifications
You must be signed in to change notification settings - Fork 17
feat: print MPI - wrapper fmt and explicit control of redirection #388
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
Open
sbstndb
wants to merge
37
commits into
hpc-maths:master
Choose a base branch
from
sbstndb:all-in-fmt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Now all print use fmt instead of std::cout.
…tended eprint changes and stray includes in FV headers (part 1)
…xplicit flux-based schemes
…des in explicit flux-based schemes" This reverts commit c5e8ef4.
…ert unintended eprint changes and stray includes in FV headers (part 1)" This reverts commit 4fbdc57.
… keep std::cerr and timers.hpp unchanged
…nclude/ (excluding timers.hpp); add includes and fmt::streamed where needed
…> includes where print.hpp is already included
…M tests, highorder, set_operator, p4est simple_2d, WENO examples, bubble_2d; add includes
…rint.hpp>; fix prediction_map to_stream; run clang-format
…::print; include <samurai/print.hpp>
…here xtensor objects are printed
…or paths to prevent unformattable type errors in fmt; print placeholder instead
…d; include <xtensor/xio.hpp>; wrap xtensor prints in burgers_os.cpp
…hpp to fix compile error
…:print across repo (excluding timers.hpp)
…i::io::print/eprint (excluding timers.hpp)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ranks != 0
, no morerdbuf
(/dev/null
). Ref:include/samurai/samurai.hpp:70
samurai::io::{print,eprint}
with scopesroot
,all
,rank(n)
to control where to print. Ref:include/samurai/print.hpp:1
--print-root-only
flag to restore historical behavior (default printing only on rank 0). Ref:include/samurai/arguments.hpp:28
--dont-redirect-output
flag (removed) and flips the default semantics.std::cout/std::cerr
withsamurai::io::{print,eprint}
, or run with--print-root-only
to get “root-only” mode. Ref:include/samurai/samurai.hpp:100
Printing examples:
--print-root-only
):samurai::io::print("Hi {}\n", name)
;stderr
:samurai::io::eprint(samurai::io::root, "Error: {}\n", msg)
;stderr
:samurai::io::eprint(samurai::io::rank(1), "Only rank 1\n")
;samurai::io::print(samurai::io::all, "{}\n", fmt::streamed(obj))
;Note: I am proposing this PR because it seems useful for users, but I am open to discussion (use of
fmt
vsstd
, defaults, naming, etc.).Available tags: 'build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'
Related issue
Global output redirection was unsafe: it overrode all
std::cout
without user control.Code of Conduct
By submitting this PR, you agree to follow our Code of Conduct