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

HcalDQM: Add protection to collection non-exist case for GPUTask #40117

Merged
merged 5 commits into from Dec 2, 2022

Conversation

lwang046
Copy link
Contributor

@lwang046 lwang046 commented Nov 19, 2022

PR description:

Regarding issue #40115, this PR corrects the reference&target name mixing in the hcalgpu task, adds some conditions to the collections non-exist case instead of throwing out fetal exception, and correct a minor numeric error in the DigiTask that should mod the LS by 60, instead of 50.

PR validation:

Tested with cmsRun DQM/Integration/python/clients/hcalgpu_dqm_sourceclient-live_cfg.py runInputDir=/afs/cern.ch/work/l/lowang/DQM_Dev/CMSSW_12_6_X_2022-11-17-2300/src/ runNumber=362217 runkey=hi_run and shows no problems.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40117/33102

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @lwang046 for master.

It involves the following packages:

  • DQM/HcalCommon (dqm)
  • DQM/HcalTasks (dqm)
  • DQM/Integration (dqm)

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @syuvivida, @pmandrik, @micsucmed, @rvenditti can you please review it and eventually sign? Thanks.
@DryRun, @battibass, @abdoulline, @bsunanda, @francescobrivio, @threus, @batinkov this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

edm::LogWarning("HcalGPUComparisonTask")
<< "Neither CPU nor GPU RecHit Collection available, will not fill this event." << std::endl;
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let me suggest an optional change to make this more compact; I did not test this, so please double-check this if you want to use it.

  auto const chbhe_ref = e.getHandle(tokHBHE_ref_);
  auto const chbhe_target = e.getHandle(tokHBHE_target_);

  if (not (chbhe_ref.isValid() and chbhe_target.isValid())) {

    if (chbhe_target.isValid()) {
      edm::LogWarning("HcalGPUComparisonTask")
          << "The CPU HBHERecHitCollection " << tagHBHE_ref_.encode() << " is not available";

      for (auto const& rh : *chbhe_target)
        energyGPUvsCPU_subdet_.fill(rh.id(), -0.5, rh.energy());
    }
    else if (chbhe_ref.isValid()) {
      edm::LogWarning("HcalGPUComparisonTask")
          << "The GPU HBHERecHitCollection " << tagHBHE_target_.encode() << " is not available";

      for (auto const& rh : *chbhe_ref)
        energyGPUvsCPU_subdet_.fill(rh.id(), rh.energy(), -0.5);
    }
    else {
      edm::LogWarning("HcalGPUComparisonTask")
          << "Neither CPU nor GPU RecHit Collection available, will not fill this event.";
    }

    return;
  }

@@ -115,7 +145,8 @@ HcalGPUComparisonTask::HcalGPUComparisonTask(edm::ParameterSet const& ps)
if (mRecHitEnergy.find(did) == mRecHitEnergy.end())
mRecHitEnergy.insert(std::make_pair(did, energy));
else
edm::LogError("HcalDQM|RechitTask") << "Duplicate Rechit from the same HcalDetId";
edm::LogError("HcalGPUComparisonTask") << "Duplicate Rechit from the same HcalDetId" << std::endl;
;
Copy link
Contributor

Choose a reason for hiding this comment

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

std::endl here is not needed, as Log* calls ignore it and apply a newline regardless.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40117/33107

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

Pull request #40117 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @syuvivida, @pmandrik, @micsucmed, @rvenditti can you please check and sign again.

@emanueleusai
Copy link
Member

type hcal,bugfix

@emanueleusai
Copy link
Member

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-83a1a4/29162/summary.html
COMMIT: 22513e4
CMSSW: CMSSW_12_6_X_2022-11-20-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40117/29162/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 9 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3417239
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3417208
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 206 log files, 48 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@cmsbuild
Copy link
Contributor

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 now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@emanueleusai
Copy link
Member

apologies commented in the wrong PR

@emanueleusai
Copy link
Member

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 2, 2022

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 now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

perrotta commented Dec 2, 2022

+1

@cmsbuild cmsbuild merged commit 5b124d1 into cms-sw:master Dec 2, 2022
lwang046 added a commit to lwang046/cmssw that referenced this pull request Dec 7, 2022
cmsbuild added a commit that referenced this pull request Dec 8, 2022
HcalDQM: Add protection to collection non-exist case for GPUTask, backport of PR #40117
cmsbuild added a commit that referenced this pull request Dec 8, 2022
HcalDQM: Add protection to collection non-exist case for GPUTask, backport of PR #40117
cmsbuild added a commit that referenced this pull request Dec 13, 2022
HcalDQM: Add protection to collection non-exist case for GPUTask, backport of PR #40117
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.

None yet

7 participants