Skip to content
Snippets Groups Projects

Improve Allen test infrastructure

Merged Daniel Hugo Campora Perez requested to merge dcampora_ci_enable_allen_tests into master

This MR improves the Allen test infrastructure in the following manners:

  • Remove included catch.hpp, and register submodule Catch2 instead, pointing to last stable version.
  • Unit tests are under test/unit_tests.
  • Added a simple test for the prefix sum function.
  • CPU and CUDA jobs that build tests, keep the artifacts, and run the tests have been added to the gitlab CI (only when run manually or in the nightly).

Note: Only tests defined in test/unit_tests will be executed in the Allen CI.

Eg. of manually-issued pipeline, which includes a run of the unit tests for both CPU and CUDA in the Test stage: https://gitlab.cern.ch/lhcb/Allen/-/pipelines/2166617

Edited by Daniel Hugo Campora Perez

Merge request reports

Checking pipeline status.

Merged by Rosen MatevRosen Matev 4 years ago (Feb 12, 2021 4:40pm UTC)

Merge details

  • Changes merged into with bfcc503a.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Roel Aaij mentioned in merge request !441 (merged)

    mentioned in merge request !441 (merged)

  • added 84 commits

    • 5aa6ad52...517ca2b3 - 71 commits from branch master
    • 6072e694 - Added Catch2 as a submodule.
    • d4a1d25e - Added Catch2 as a submodule, and added test folder with some tests (doesn't compile properly yet).
    • f5e592b9 - Removed previously bundled catch.hpp file. Added working tests under unit_tests folder.
    • 1c6d7609 - Added relevant tests.
    • 82e7b7ce - Added ctest commands to CI.
    • 5b9a8a3e - Fix CI syntax.
    • 2b25c14f - Fixed formatting
    • ef70f20f - Made run_built_tests a templated job.
    • 3b524cad - Fix location of tests (include build*/).
    • ec85fae5 - Run differently on different targets.
    • b86d5c51 - Attempt at fixing CI test run.
    • 40f59d1c - Replace build directory with directory where artifacts live in run_built_tests_job.
    • 30df339b - Added TestPrefixSum.

    Compare with previous version

  • Daniel Hugo Campora Perez changed the description

    changed the description

  • Rosen Matev
  • added 27 commits

    • 30df339b...308110e1 - 13 commits from branch master
    • 82fc2bea - Added Catch2 as a submodule.
    • f81e8e2c - Added Catch2 as a submodule, and added test folder with some tests (doesn't compile properly yet).
    • df79c9df - Removed previously bundled catch.hpp file. Added working tests under unit_tests folder.
    • c23bc360 - Added relevant tests.
    • 12eeaf5d - Added ctest commands to CI.
    • f4ee1542 - Fix CI syntax.
    • 28592c8b - Fixed formatting
    • bf98a540 - Made run_built_tests a templated job.
    • 4fc1f195 - Fix location of tests (include build*/).
    • 7bb76f40 - Run differently on different targets.
    • b4786336 - Attempt at fixing CI test run.
    • 7d13e301 - Replace build directory with directory where artifacts live in run_built_tests_job.
    • ca21dfc5 - Added TestPrefixSum.
    • 4beafc0f - Fixed test runs on CUDA architecture.

    Compare with previous version

  • Daniel Hugo Campora Perez changed the description

    changed the description

  • added 2 commits

    • 19e98683 - Added executable path of CMake 3.19.
    • 31dafec3 - Fixed CMake 3.19 usage on build_job_with_tests_def.

    Compare with previous version

  • added 1 commit

    • b32c828b - Added missing mkdir, cd and yum install commands in build job with tests.

    Compare with previous version

  • added 1 commit

    • 608ff85a - Add HIPCC_OPTIONS to hip_add_executable options.

    Compare with previous version

  • mentioned in issue Moore#237 (closed)

  • mentioned in merge request !490 (merged)

  • added 28 commits

    • 608ff85a...356e2a35 - 10 commits from branch master
    • 77278ef2 - Added Catch2 as a submodule.
    • 1444c493 - Added Catch2 as a submodule, and added test folder with some tests (doesn't compile properly yet).
    • 7f5a3143 - Removed previously bundled catch.hpp file. Added working tests under unit_tests folder.
    • 231d6b2f - Added relevant tests.
    • 945b5ba2 - Added ctest commands to CI.
    • 623340b4 - Fix CI syntax.
    • 5f5ec785 - Fixed formatting
    • 4d3e5ab2 - Made run_built_tests a templated job.
    • 055ff353 - Fix location of tests (include build*/).
    • 76db926b - Run differently on different targets.
    • af0f3a38 - Attempt at fixing CI test run.
    • bd2bbb9f - Replace build directory with directory where artifacts live in run_built_tests_job.
    • 5cf95313 - Added TestPrefixSum.
    • cee949fe - Fixed test runs on CUDA architecture.
    • 4b0fcf0c - Added executable path of CMake 3.19.
    • 413f812c - Fixed CMake 3.19 usage on build_job_with_tests_def.
    • 9d336bc9 - Added missing mkdir, cd and yum install commands in build job with tests.
    • 04359838 - Add HIPCC_OPTIONS to hip_add_executable options.

    Compare with previous version

  • added 1 commit

    • 2f53af80 - Reverted to requiring CMake 3.12.

    Compare with previous version

  • Rosen Matev assigned to @rmatev and unassigned @lpica

    assigned to @rmatev and unassigned @lpica

  • Daniel Hugo Campora Perez changed the description

    changed the description

  • added Build label

  • added 1 commit

    • d4775dcb - Reverted readme to not requiring CMake 3.18.

    Compare with previous version

  • mentioned in issue #203 (closed)

  • added 35 commits

    • d4775dcb...8f4e250f - 16 commits from branch master
    • 71d6c83b - Added Catch2 as a submodule.
    • 18cce63d - Added Catch2 as a submodule, and added test folder with some tests (doesn't compile properly yet).
    • b3ea3229 - Removed previously bundled catch.hpp file. Added working tests under unit_tests folder.
    • 8d223c66 - Added relevant tests.
    • a620105f - Added ctest commands to CI.
    • 6bcd5717 - Fix CI syntax.
    • ec2638ed - Fixed formatting
    • 6afc294e - Made run_built_tests a templated job.
    • a9a0a26e - Fix location of tests (include build*/).
    • 7ea9e3cf - Run differently on different targets.
    • 14cfa383 - Attempt at fixing CI test run.
    • c8658705 - Replace build directory with directory where artifacts live in run_built_tests_job.
    • a385f87c - Added TestPrefixSum.
    • 4df927b4 - Fixed test runs on CUDA architecture.
    • 26b91c7f - Added executable path of CMake 3.19.
    • bb2cfa71 - Fixed CMake 3.19 usage on build_job_with_tests_def.
    • 7dfaca7f - Add HIPCC_OPTIONS to hip_add_executable options.
    • ca9cb06f - Reverted to requiring CMake 3.12.
    • f0a4c656 - Reverted readme to not requiring CMake 3.18.

    Compare with previous version

  • There is an issue in this branch, caused by the redefinition of flag -std=c++XX in the CUDA build, see https://gitlab.cern.ch/lhcb/Allen/-/jobs/11565549 :

    FAILED: test/unit_tests/CMakeFiles/unit_tests.dir/generic/src/TestPrefixSum.cu.o 
    /cvmfs/sft.cern.ch/lcg/releases/cuda/11.1-84dca/x86_64-centos7-gcc8-opt/bin/nvcc  -DENABLE_CONTRACTS -DMEMORY_MANAGER_SINGLE_ALLOC -DTARGET_DEVICE_CUDA -I../test/contracts/include -I../external/Catch2/single_include/catch2 -I../host/prefix_sum/include -I../backend/include -I../stream/gear/include -I../stream/sequence/include -I../main/include -I../test/unit_tests/generic/include -I../external/Catch2/single_include -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_86,code=sm_86 -Xcudafe --display_error_number --use_fast_math --expt-relaxed-constexpr  -std=c++17 -G -g -DALLEN_DEBUG -Xcompiler=-fPIE   -std=c++03 -x cu -c ../test/unit_tests/generic/src/TestPrefixSum.cu -o test/unit_tests/CMakeFiles/unit_tests.dir/generic/src/TestPrefixSum.cu.o && /cvmfs/sft.cern.ch/lcg/releases/cuda/11.1-84dca/x86_64-centos7-gcc8-opt/bin/nvcc  -DENABLE_CONTRACTS -DMEMORY_MANAGER_SINGLE_ALLOC -DTARGET_DEVICE_CUDA -I../test/contracts/include -I../external/Catch2/single_include/catch2 -I../host/prefix_sum/include -I../backend/include -I../stream/gear/include -I../stream/sequence/include -I../main/include -I../test/unit_tests/generic/include -I../external/Catch2/single_include -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_86,code=sm_86 -Xcudafe --display_error_number --use_fast_math --expt-relaxed-constexpr  -std=c++17 -G -g -DALLEN_DEBUG -Xcompiler=-fPIE   -std=c++03 -x cu -M ../test/unit_tests/generic/src/TestPrefixSum.cu -MT test/unit_tests/CMakeFiles/unit_tests.dir/generic/src/TestPrefixSum.cu.o -o test/unit_tests/CMakeFiles/unit_tests.dir/generic/src/TestPrefixSum.cu.o.d
    nvcc warning : incompatible redefinition for option 'std'

    In order to overcome that issue, the proper solution is to add the line set(CUDA_STANDARD 17) to the main CMakeLists.txt, which requires CMake 3.18. Unfortunately, while CMake 3.18 is in CVMFS, it is not yet part of any LCG release.

    Note that the issue is seemingly intermittent. In these other two builds it worked with no issue: https://gitlab.cern.ch/lhcb/Allen/-/pipelines/2217483 and https://gitlab.cern.ch/lhcb/Allen/-/pipelines/2218266.

    I suggest since the actual solution, better practice and future proof manner to do it is to use set(CUDA_STANDARD 17) to use that here. Since we are bound to LCG releases, unfortunately that means we cannot merge this branch until LCG releases with CMake 3.18 or greater exist and are used as release platforms in Jenkins tests. If there is no other option, then that would mean letting this branch stale until that happens.

    For reference, CMake 3.19 was set in this branch in this commit: !475 (26b91c7f)

    Edited by Daniel Hugo Campora Perez
  • Rosen Matev assigned to @dcampora and unassigned @rmatev

    assigned to @dcampora and unassigned @rmatev

  • added 1 commit

    • ebc7c4fa - Use cmake 3.18.4. Attempt to add external/.gaudi_project_ignore.

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading