Skip to content
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

Less prints to output #9

Open
amartyads opened this issue Oct 16, 2023 · 3 comments
Open

Less prints to output #9

amartyads opened this issue Oct 16, 2023 · 3 comments
Assignees

Comments

@amartyads
Copy link
Member

currently every rank prints "Run CouetteScenario", "Finish CouetteScenario::initSolvers()" and "Finish CouetteScenario::shutdown() Shut down CouetteScenario" to the output. It floods output and makes manual scanning very cumbersome, and writes huge files with no actual data. We should remove these prints.

@rubenhorn
Copy link
Contributor

rubenhorn commented Nov 7, 2023

In general there is a lot of std::cout << ... (1258 occurrences to be exact).
Perhaps we should (gradually) replace them with a logger that takes either verbosity level or tag as a parameter, a runtime parameter to filter before output and a default option in CMake.

@rubenhorn rubenhorn self-assigned this Nov 7, 2023
@rubenhorn
Copy link
Contributor

The logging function should also automatically include configurable additional information:

  • The Unix timestamp of the output
  • The MPI rank (How… call MPI_comm_rank every time? Seems excessive)
  • The __FILE__ and __LINE__ of the log statement (Requires use of a macro, but I think it may be permissible if it is only used as a simple wrapper for the logging function)

@Thinkpiet
Copy link
Member

@rubenhorn There is already a way to get the MPI rank anywhere, without passing it everywhere or calling MPI_comm_rank excessively: coupling::indexing::IndexingService<dim>::getInstance().getRank().

Note that it will always return the rank relative to the PinT domain (i.e. temporal subdomain if the simulation is time parallel), not the rank in MPI_COMM_WORLD, but I guess that is actually desired here. (For writing output to the logging system from time parallel simulations, the 'time local' rank AND the PinT domain number should be printed, not the global rank)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants