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

Migrate to tbb::task_group #32804

Merged
merged 32 commits into from
Mar 8, 2021
Merged

Migrate to tbb::task_group #32804

merged 32 commits into from
Mar 8, 2021

Conversation

Dr15Jones
Copy link
Contributor

PR description:

The tbb::task ABI has been deprecated by Intel's developers in favor of tbb::task_group.

PR validation:

The code compiles and all framework related unit tests succeed.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32804/20977

  • This PR adds an extra 472KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32804/20979

  • This PR adds an extra 320KB to repository

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

FWCore/Concurrency
FWCore/Framework
FWCore/Integration
FWCore/TestProcessor
IOPool/Input

@makortel, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

hold

additional changes are expected but a fuller test is useful.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

Pull request has been put on hold by @Dr15Jones
They need to issue an unhold command to remove the hold state or L1 can unhold it for all

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

-1

Failed Tests: Build ClangBuild
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-422c34/12683/summary.html
COMMIT: db792e2
CMSSW: CMSSW_11_3_X_2021-02-03-0800/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/32804/12683/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/LHEFilter.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/LHE2HepMCConverter.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/ExternalLHEAsciiDumper.cc
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc: In lambda function:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc:303:45: error: no matching function for call to 'make_functor_task(tbb::internal::allocate_root_proxy, ExternalLHEProducer::beginRunProduce(edm::Run&, const edm::EventSetup&)::::)'
  303 |                                            });
      |                                             ^
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/FWCore/Framework/src/Worker.h:47,
                 from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/FWCore/Framework/src/Factory.h:5,
                 from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_3_X_2021-02-03-0800/src/FWCore/Framework/interface/MakerMacros.h:4,


Clang Build

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32804/20992

@santocch
Copy link

santocch commented Mar 7, 2021

+1

@qliphy
Copy link
Contributor

qliphy commented Mar 8, 2021

ping @cms-sw/generators-l2

@agrohsje
Copy link

agrohsje commented Mar 8, 2021

+generators

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2021

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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Mar 8, 2021

+1

@cmsbuild cmsbuild merged commit 6029d3d into cms-sw:master Mar 8, 2021
@Dr15Jones Dr15Jones deleted the task_group branch March 8, 2021 14:52
@mrodozov
Copy link
Contributor

mrodozov commented Mar 8, 2021

@Dr15Jones DD4hep uses tbb. Perhaps the changes in this PR somehow caused a re-calculation of the geometry by DD4hep, which then produced statistical fluctuations in the results of simulation using DD4hep. The comparison differences for 11634.911 are not significant.

DD4Hep is not using TBB since cms-sw/cmsdist#6554 when we removed it

//
// Created by Chris Jones on 2/24/21.
//
#define TBB_PREVIEW_RESUMABLE_TASKS 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @Dr15Jones, we suspect this define is causing a recent CXXMODULES IB regression. Would it be possible to move this define (I saw another one in the cc file) to the build system and possibly add it to the rootcling invocation (if scram does not do that automatically).

cc: @davidlange6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vgvassilev in principal, setting this at compile time should work. We did it in the header since that was the recommendation of the TBB developers.

@smuzaffar do you want to try it as a build directive?

Copy link
Contributor

Choose a reason for hiding this comment

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

in one of the headers including tbb/task_group.h but not consistently. I think thats why we noticed. I can experiment on the modules IB branch if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in one of the headers including tbb/task_group.h but not consistently.

That was intentional. It is only turned on where the feature is needed. Again, that was the recommendation of the tbb developers.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Dr15Jones , yes we can set it at build time. @davidlange6 , are you testing it by adding it in the tbb.xml toolfile? You can add it in the toolfile and then scram should set itfo rboth normal build and rootcling

Copy link
Contributor

Choose a reason for hiding this comment

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

this macro is now defined via tbb toolfile ( see #33140 and cms-sw/cmsdist#6713 )

Copy link
Contributor

Choose a reason for hiding this comment

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

in one of the headers including tbb/task_group.h but not consistently.

That was intentional. It is only turned on where the feature is needed. Again, that was the recommendation of the tbb developers.

I'd assume they did not know about the fact we use C++ modules in the dictionaries. In theory, we can still use the macro the way we do, and only pass the relevant -D to rootcling. Not sure if that's worth it.

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.