Skip to content

Conversation

@ekouts
Copy link
Contributor

@ekouts ekouts commented Dec 20, 2022

This is first attempt to fix the bug, but maybe we should investigate more:

  1. how to handle errors in log_performance. It's not a good idea to completely suppress them, because the error that ReFrame gives in this case can be very confusing
  2. if it's correct to have check == None for non-performance tests

Fixes #2715 .

@ekouts ekouts added this to the ReFrame sprint 22.12.1 milestone Dec 20, 2022
@ekouts ekouts requested review from teojgo and vkarak December 20, 2022 13:33
@ekouts ekouts self-assigned this Dec 20, 2022
Copy link
Contributor

@teojgo teojgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that what you need to do is to check:

self.check.is_performance_check()

And perform the performance logging in

self._perflogger.log_performance(logging.INFO, self,

only when it is actually a performance check. If it's not a performance test, then the perflogger will not have been set properly with the check name here:

self._perflogger = logging.getperflogger(self.check)

@ekouts ekouts requested a review from teojgo December 20, 2022 15:44
@ekouts
Copy link
Contributor Author

ekouts commented Dec 20, 2022

I think that what you need to do is to check:

self.check.is_performance_check()

And perform the performance logging in

self._perflogger.log_performance(logging.INFO, self,

only when it is actually a performance check. If it's not a performance test, then the perflogger will not have been set properly with the check name here:

self._perflogger = logging.getperflogger(self.check)

Yes, I think your solution is nicer. I fixed it

@ekouts ekouts changed the title [bugfix] Fix multiline perflog bug in non-performance tests [bugfix] Fix multiline perflog in non-performance tests Dec 20, 2022
@vkarak vkarak changed the title [bugfix] Fix multiline perflog in non-performance tests [bugfix] Fix logging crash for non-performance tests when the perflog_compat option is on Dec 20, 2022
@vkarak vkarak changed the title [bugfix] Fix logging crash for non-performance tests when the perflog_compat option is on [bugfix] Fix cleanup crash for non-performance tests when the perflog_compat option is on Dec 20, 2022
@vkarak vkarak merged commit a7e49b9 into reframe-hpc:master Dec 20, 2022
@ekouts ekouts deleted the bugfix/perflog_compat branch December 20, 2022 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with multiline logging

3 participants