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
FWCore/Services: do not optimize 'edmtest::FpeTester::analyze' #8892
Conversation
A new Pull Request was created by @davidlt for CMSSW_7_5_X. FWCore/Services: do not optimize 'edmtest::FpeTester::analyze' It involves the following packages: FWCore/Services @cmsbuild, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks. |
-1 |
This does not affect relvals and all failures are |
@@ -54,6 +54,7 @@ namespace edmtest { | |||
} | |||
|
|||
void | |||
__attribute__((optnone)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the C++11 syntax instead? [[optnone]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking carefully into Clang testsuite, I found [[clang::optnone]]
, but I don't know how GCC (or other compilers) would handle that.
Resolves unit test (`fpe_test_2.sh`) failure in CLANG IB. Completed cmsRun with DIVIDEBYZERO exception enabled cmsRun status: 0 Test FAILED, status neither 136 nor 11 status = 256 `do_division` call is optimized out from `edmtest::FpeTester::analyze`. It's caused by division by zero, which is undefined behavior thus compiler is free to do what it wants, e.g., optimize it out. Disable any optimizations on the function. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
3b2d740
to
93ab028
Compare
Updated. Seems to work with GCC, but Clang was picky about attribute location. Even ICC was happy! |
pleaset test |
+1 |
Comparison is ready The workflows 140.53 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @smuzaffar |
+1 |
FWCore/Services: do not optimize 'edmtest::FpeTester::analyze'
Resolves unit test (
fpe_test_2.sh
) failure in CLANG IB.do_division
call is optimized out fromedmtest::FpeTester::analyze
.It's caused by division by zero, which is undefined behavior thus
compiler is free to do what it wants, e.g., optimize it out.
Disable any optimizations on the function.
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch