Skip to content

Conversation

@fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Apr 27, 2022

PR description:

This PR introduces examples with the integration of alpaka in CMSSW, and the use of macro-based SoA data structres.

PR validation:

cmsRun HeterogeneousCore/AlpakaTest/test/writer.py
cmsRun HeterogeneousCore/AlpakaTest/test/reader.py

run successfully, both with and without a GPU, using a SwitchProducerCUDA to choose the modules to run.

In both cases, the test.root file created by the writer.py configuration contains the same collections:

$ edmDumpEventContent --all test.root 
Type                                  Module                 Label     Process         Full Name
------------------------------------------------------------------------------------------------
PortableHostCollection<portabletest::TestSoALayout<128,false> >    "testProducer"         ""        "Writer"        128falseportabletestTestSoALayoutPortableHostCollection_testProducer__Writer
PortableHostCollection<portabletest::TestSoALayout<128,false> >    "testProducerSerial"   ""        "Writer"        128falseportabletestTestSoALayoutPortableHostCollection_testProducerSerial__Writer

Open issues, to be followed up in future PRs

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 27, 2022

@makortel FYI

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 27, 2022

@ericcano next I'll try to see if the approach you presented for dictionary-based streamers cam be used with this data layout.

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 27, 2022

@cmsbuild, please test with cmsdist#7828

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37716/29553

ERROR: Build errors found during clang-tidy run.

      : buffer_{alpaka::allocMappedBuf<std::byte, uint32_t>(
                                                ^
DataFormats/Portable/interface/AlpakaHostCollection.h:28:51: error: unexpected type name 'uint32_t': expected expression [clang-diagnostic-error]
      : buffer_{alpaka::allocMappedBuf<std::byte, uint32_t>(
                                                  ^
DataFormats/XyzId/interface/XyzIdSoA.h:18:47: warning: use nullptr [modernize-use-nullptr]
--
HeterogeneousCore/AlpakaTest/plugins/alpaka/XyzIdAlpakaProducer.cc:34:58: error: no matching constructor for initialization of 'alpaka_common::Vec1D' (aka 'Vec<std::integral_constant<unsigned long, 1>, unsigned int>') [clang-diagnostic-error]
        auto hostView = alpaka::createView(host, &value, Vec1D{1});
                                                         ^
/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/external/alpaka/develop-20220124-be044e27009da1397ddbf84bb1c38c79/include/alpaka/vec/Vec.hpp:77:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const alpaka::Vec<std::integral_constant<unsigned long, 1>, unsigned int>' for 1st argument
--
HeterogeneousCore/AlpakaTest/plugins/alpaka/XyzIdAlpakaProducer.cc:35:77: error: no matching constructor for initialization of 'alpaka_common::Vec1D' (aka 'Vec<std::integral_constant<unsigned long, 1>, unsigned int>') [clang-diagnostic-error]
        auto deviceView = alpaka::createView(device, &deviceProduct->id(i), Vec1D{1});
                                                                            ^
/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/external/alpaka/develop-20220124-be044e27009da1397ddbf84bb1c38c79/include/alpaka/vec/Vec.hpp:77:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const alpaka::Vec<std::integral_constant<unsigned long, 1>, unsigned int>' for 1st argument
--
/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/external/alpaka/develop-20220124-be044e27009da1397ddbf84bb1c38c79/include/alpaka/mem/buf/BufCpu.hpp:344:21: error: static_assert failed due to requirement 'meta::DependentFalseType<std::byte>::value' "Memory pinning of BufCpu is not implemented when CUDA or HIP is not enabled!" [clang-diagnostic-error]
                    static_assert(
                    ^
/cvmfs/cms-ib.cern.ch/nweek-02730/slc7_amd64_gcc10/external/alpaka/develop-20220124-be044e27009da1397ddbf84bb1c38c79/include/alpaka/mem/buf/Traits.hpp:144:35: note: in instantiation of member function 'alpaka::traits::Pin<alpaka::BufCpu<std::byte, std::integral_constant<unsigned long, 1>, unsigned int>>::pin' requested here
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@fwyzard
Copy link
Contributor Author

fwyzard commented May 1, 2022

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2022

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37716/29638

ERROR: Build errors found during clang-tidy run.

      : buffer_{alpaka::allocMappedBuf<std::byte, uint32_t>(
                                                ^
DataFormats/Portable/interface/AlpakaHostCollection.h:28:51: error: unexpected type name 'uint32_t': expected expression [clang-diagnostic-error]
      : buffer_{alpaka::allocMappedBuf<std::byte, uint32_t>(
                                                  ^
DataFormats/XyzId/interface/XyzIdSoA.h:18:47: warning: use nullptr [modernize-use-nullptr]
--
/cvmfs/cms-ib.cern.ch/nweek-02731/slc7_amd64_gcc10/external/alpaka/develop-20220124-8161647006104893911ceea4b70c9bf5/include/alpaka/mem/buf/BufCpu.hpp:344:21: error: static_assert failed due to requirement 'meta::DependentFalseType<std::byte>::value' "Memory pinning of BufCpu is not implemented when CUDA or HIP is not enabled!" [clang-diagnostic-error]
                    static_assert(
                    ^
/cvmfs/cms-ib.cern.ch/nweek-02731/slc7_amd64_gcc10/external/alpaka/develop-20220124-8161647006104893911ceea4b70c9bf5/include/alpaka/mem/buf/Traits.hpp:144:35: note: in instantiation of member function 'alpaka::traits::Pin<alpaka::BufCpu<std::byte, std::integral_constant<unsigned long, 1>, unsigned int>>::pin' requested here
--
HeterogeneousCore/AlpakaTest/plugins/alpaka/XyzIdAlpakaProducer.cc:34:58: error: no matching constructor for initialization of 'alpaka_common::Vec1D' (aka 'Vec<std::integral_constant<unsigned long, 1>, unsigned int>') [clang-diagnostic-error]
        auto hostView = alpaka::createView(host, &value, Vec1D{1});
                                                         ^
/cvmfs/cms-ib.cern.ch/nweek-02731/slc7_amd64_gcc10/external/alpaka/develop-20220124-8161647006104893911ceea4b70c9bf5/include/alpaka/vec/Vec.hpp:77:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const alpaka::Vec<std::integral_constant<unsigned long, 1>, unsigned int>' for 1st argument
--
HeterogeneousCore/AlpakaTest/plugins/alpaka/XyzIdAlpakaProducer.cc:35:77: error: no matching constructor for initialization of 'alpaka_common::Vec1D' (aka 'Vec<std::integral_constant<unsigned long, 1>, unsigned int>') [clang-diagnostic-error]
        auto deviceView = alpaka::createView(device, &deviceProduct->id(i), Vec1D{1});
                                                                            ^
/cvmfs/cms-ib.cern.ch/nweek-02731/slc7_amd64_gcc10/external/alpaka/develop-20220124-8161647006104893911ceea4b70c9bf5/include/alpaka/vec/Vec.hpp:77:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const alpaka::Vec<std::integral_constant<unsigned long, 1>, unsigned int>' for 1st argument
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@fwyzard
Copy link
Contributor Author

fwyzard commented May 1, 2022

code-checks with cms.week0.PR_c6234e23/52.0-e5fc711ca04bf11e268970421bcf4385

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2022

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37716/29639

  • This PR adds an extra 24KB to repository

  • Found files with invalid states:

    • HeterogeneousCore/AlpakaTest/test/test.py:

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

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7745f5/26391/summary.html
COMMIT: 9f8983e
CMSSW: CMSSW_12_5_X_2022-07-21-2300/el8_amd64_gcc10
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37716/26391/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • Reco comparison had 3 failed jobs
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19876
  • DQMHistoTests: Total failures: 1137
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 18739
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: found differences in 1 / 3 workflows

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7745f5/13234.0_TTbar_14TeV+2021FS+TTbar_14TeV_TuneCP5_FastSimRun3+HARVESTFastRun3
  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7745f5/13434.0_TTbar_14TeV+2021FSPU+TTbar_14TeV_TuneCP5_FastSimRun3PU+HARVESTFastRun3PU

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 51
  • DQMHistoTests: Total histograms compared: 3706484
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3706454
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
  • Checked 210 log files, 47 edm output root files, 51 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

How do we get the bot to recognize that the new packages have been assigned (i.e. get rid of the new-package-pending label)?

@fwyzard fwyzard changed the base branch from master to CMSSW_12_5_X July 25, 2022 11:13
@fwyzard fwyzard changed the base branch from CMSSW_12_5_X to master July 25, 2022 11:13
@fwyzard fwyzard force-pushed the CMSSW_12_4_0_pre3_WIP_test_alpaka_data_formats branch from 9f8983e to 866bf1d Compare July 25, 2022 11:21
@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 25, 2022

I force-pushed without any changes, let's see if that updates the labels.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 25, 2022

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37716/31254

  • This PR adds an extra 108KB to repository

@cmsbuild
Copy link
Contributor

Pull request #37716 was updated. @makortel, @fwyzard can you please check and sign again.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 25, 2022

How do we get the bot to recognize that the new packages have been assigned (i.e. get rid of the new-package-pending label)?

The label still appears after making a copy of this PR: #38855 .
I'll re-check the bot configuration.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 25, 2022

Turns out I missed one of the new packages. Should be fixed by cms-sw/cms-bot#1792.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 25, 2022

Anyway closing this PR in favour of #38855, which has a better branch name :-)

@fwyzard fwyzard closed this Jul 25, 2022
@fwyzard fwyzard deleted the CMSSW_12_4_0_pre3_WIP_test_alpaka_data_formats branch July 25, 2022 11:44
@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7745f5/26438/summary.html
COMMIT: 866bf1d
CMSSW: CMSSW_12_5_X_2022-07-25-1100/el8_amd64_gcc10
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37716/26438/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • Reco comparison had 3 failed jobs
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19876
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 19868
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 16 differences found in the comparisons
  • DQMHistoTests: Total files compared: 51
  • DQMHistoTests: Total histograms compared: 3667670
  • DQMHistoTests: Total failures: 19
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3667628
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 50 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 210 log files, 47 edm output root files, 51 DQM output files
  • TriggerResults: no differences found

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.

6 participants