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

Change logging strategy and add new logging for adaptivity metrics #133

Merged
merged 19 commits into from
Dec 16, 2024

Conversation

IshaanDesai
Copy link
Member

@IshaanDesai IshaanDesai commented Nov 7, 2024

This PR adds the following:

  • A new logging framework with a dedicated Logger class. In this class, a logger is generated and logging options are provided for logging via one one rank, any rank of choice, or all ranks. Different types of logging are possible. Currently the options are info and error.
  • Breaking change: changes the configuration parameter config_file_name to precice_config_file_name to differentiate it from the Micro Manager JSON configuration file.
  • Add optional parameter output_cpu_time to adaptivity_settings which will output CPU time of the adaptivity computation on every rank. The data is written to preCICE with the intention of being exported. All the micro simulations (coupling vertices) on one rank will have the same scalar value of the adaptivity computation CPU time.
  • Breaking change: Change the name of the diagnostics output micro_sim_time to solve_cpu_time.

Checklist:

  • I made sure that the CI passed before I ask for a review.
  • I added a summary of the changes (compared to the last release) in the CHANGELOG.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@IshaanDesai IshaanDesai self-assigned this Nov 7, 2024
@Fujikawas
Copy link

Would be good to put the "number of active simulations" into a format which is more machine-readable than the current text style.

@uekerman
Copy link
Member

Could precice/precice#2015 be an alternative technical solution?

@IshaanDesai
Copy link
Member Author

Could precice/precice#2015 be an alternative technical solution?

Potentially yes. I have implemented something very close to this, with additionally handling logging in parallel. Would it be possible to tell preCICE to log somethings only on one rank, and other things on all ranks? Also, such logging API would need to be added to the Python bindings.

@uekerman
Copy link
Member

Would it be possible to tell preCICE to log somethings only on one rank, and other things on all ranks?

Yes, this is part of the runtime configuration for the existing preCICE logging already now.

@IshaanDesai IshaanDesai added breaking change A change will break backwards compatibilty new-feature Adding a new feature labels Dec 3, 2024
@IshaanDesai IshaanDesai changed the title Change logging strategy by wrapping Python logger in a new class Change logging strategy and add new logging for adaptivity metrics Dec 9, 2024
@IshaanDesai IshaanDesai linked an issue Dec 10, 2024 that may be closed by this pull request
@IshaanDesai IshaanDesai merged commit 4f9acf7 into develop Dec 16, 2024
10 checks passed
@IshaanDesai IshaanDesai deleted the logging branch December 16, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change will break backwards compatibilty new-feature Adding a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output runtime for calculation of similarity
3 participants