-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Truncate pt of PackedCandidate #27988
Conversation
In response to cms-sw#27374, truncating pt of PackedCandidate in case the 32 bit representation is beyond the 16-bit max (represented by the "minifloat" as inf, as per that standard requirement [here](ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf)). This was giving problems downstream when the 16-bit "infinity" was widened to 32 bits and became inaccurate.
The code-checks are being triggered in jenkins. |
@gpetruc FYI |
Thank you @rappoccio |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27988/11882
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
Adding a space.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27988/11883
|
A new Pull Request was created by @rappoccio for master. It involves the following packages: DataFormats/PatCandidates @perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
-1 Tested at: 3c41623 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: You can see the results of the tests here: I found follow errors while testing this PR Failed tests: Build ClangBuild
I found compilation error when building: >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/Vertexing.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/Electron.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/Muon.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/TauPFSpecific.cc /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/PackedCandidate.cc: In member function 'void pat::PackedCandidate::pack(bool)': /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/PackedCandidate.cc:14:74: error: no matching function for call to 'min(ROOT::Math::LorentzVector >::Scalar, float)' float unpackedPt = std::min(p4_.load()->Pt(), MiniFloatConverter::max()); ^ In file included from /cvmfs/cms-ib.cern.ch/nweek-02593/slc7_amd64_gcc820/external/gcc/8.2.0-pafccj/include/c++/8.3.1/bits/specfun.h:45, from /cvmfs/cms-ib.cern.ch/nweek-02593/slc7_amd64_gcc820/external/gcc/8.2.0-pafccj/include/c++/8.3.1/cmath:1892, from /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw-patch/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/Math/interface/deltaPhi.h:11,
I found compilation error while trying to compile with clang. Command used:
>> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/Muon.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/PATTauDiscriminator.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/TauPFSpecific.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/TriggerFilter.cc >> Compiling /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/TauJetCorrFactors.cc /build/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_0_X_2019-09-12-2300/src/DataFormats/PatCandidates/src/PackedCandidate.cc:14:22: error: no matching function for call to 'min' float unpackedPt = std::min(p4_.load()->Pt(), MiniFloatConverter::max()); ^~~~~~~~ /cvmfs/cms-ib.cern.ch/nweek-02593/slc7_amd64_gcc820/external/gcc/8.2.0-pafccj/lib/gcc/x86_64-unknown-linux-gnu/8.3.1/../../../../include/c++/8.3.1/bits/algorithmfwd.h:383:5: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('double' vs. 'float') min(const _Tp&, const _Tp&); ^ The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: |
Comparison not run due to Build errors (RelVals and Igprof tests were also skipped) |
I can do a backport if desired, but let me know. |
@rappoccio could you please verify as in #27374 (comment) that the packing of the candidates gets fixed with this PR? |
Apologies for the delay. I confirm that this is now working as intended. Before fix:
After fix:
So this is giving the 16-bit max as intended. |
Thank you @rappoccio : everything as expected, but better to check it explicitly |
+1
|
One has to decide whether it is worth backporting this to 10_6_X Discussing it with Slava we agreed that this could be considered more a bug fix that prevents unwanted crashes in productions (e.g. nanoAOD), rather than a behavior changing PR. Then probably a backport PR should be foreseen. What do you think, @fabiocos? |
@perrotta to my mind this is just a protection for pathological situations, so I do not see any violation of the no-physics-change policy if a backport is done (and I would consider it useful as 10_6_X should serve us for long time). So I would suggest to go ahead wit it |
@perrotta also if you backport this, the boosted sv producer protection
should be redundant
…On Fri, Sep 20, 2019, 19:18 Fabio Cossutti ***@***.***> wrote:
@perrotta <https://github.com/perrotta> to my mind this is just a
protection for pathological situations, so I do not see any violation of
the no-physics-change policy if a backport is done (and I would consider it
useful as 10_6_X should serve us for long time). So I would suggest to go
ahead wit it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27988?email_source=notifications&email_token=ADE5EBDRMAJ25P52CPEQBATQKTZWXA5CNFSM4IWQI4QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7HGK6A#issuecomment-533620088>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADE5EBB76OI2DRDS5D5UJLTQKTZWXANCNFSM4IWQI4QA>
.
|
Backport of changes from cms-sw#27988
Backport of changes from cms-sw#27988
Backport is #28043 |
it will actually not be redundant for the cases of running on old miniAOD (e.g. some nanoAOD reprocessing with btags remade). I'm not sure though if we have these cases at the production scale for 106X. |
+1 |
merge |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will be automatically merged. |
Backport of #27988 (Truncate pt of PackedCandidate)
PR description:
In response to #27374, truncating pt of PackedCandidate in case the 32 bit representation is beyond the 16-bit max (represented by the "minifloat" as inf, as per that standard requirement here). This was giving problems downstream when the 16-bit "infinity" was widened to 32 bits and became inaccurate.
PR validation:
This is so deep in the software stack that it is challenging to predict the behavior without ALL of the validations being run.