Improve Allen test infrastructure
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
Merge request reports
Activity
assigned to @lpica
- Resolved by Rosen Matev
added 1 commit
- 4f34a5d5 - Replace build directory with directory where artifacts live in run_built_tests_job.
added 17 commits
-
4f34a5d5...008e7eb6 - 3 commits from branch
master
- decbb614 - Enable Allen CI tests in standalone mode.
- b1e77999 - Added Catch2 as a submodule.
- 1f76b6fd - Added Catch2 as a submodule, and added test folder with some tests (doesn't compile properly yet).
- 617441a6 - Removed previously bundled catch.hpp file. Added working tests under unit_tests folder.
- f83ed24a - Disable only mdf catch test.
- 62ff115d - Added relevant tests.
- 27e606b0 - Attempt to add ctest -V command in web CI schedule.
- be90be51 - Fix CI syntax.
- 168cbd4d - Fixed formatting
- baf37c01 - Made run_built_tests a templated job.
- 7cd417af - Fix location of tests (include build*/).
- f50d38d1 - Run differently on different targets.
- 27c4bda2 - Attempt at fixing CI test run.
- 18c7056d - Replace build directory with directory where artifacts live in run_built_tests_job.
Toggle commit list-
4f34a5d5...008e7eb6 - 3 commits from branch
added 1 commit
- a42a10f5 - Added a retry: 1 since a failure at compilation was observed.
added 1 commit
- 8924ebfb - Added LCG_ARCHITECTURE to all jobs, in order to be able to configure their...
added 1 commit
- d4390a8a - Remove Ks02MuMu mag down dataset run until we solve running on it. Removed -V...
- Resolved by Rosen Matev
mentioned in merge request !441 (merged)
added testing label
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.
Toggle commit list-
5aa6ad52...517ca2b3 - 71 commits from branch
- Resolved by 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.
Toggle commit list-
30df339b...308110e1 - 13 commits from branch
added 1 commit
- b32c828b - Added missing mkdir, cd and yum install commands in build job with tests.
added 1 commit
- 608ff85a - Add HIPCC_OPTIONS to hip_add_executable options.
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.
Toggle commit list-
608ff85a...356e2a35 - 10 commits from branch
- Resolved by Daniel Hugo Campora Perez
/ci-test --merge
added ci-test-triggered label
- [2021-01-08 15:13] Validation started with lhcb-master-mr#1795
added Build label
- Resolved by Daniel Hugo Campora Perez
- Resolved by Daniel Hugo Campora Perez
added 1 commit
- d4775dcb - Reverted readme to not requiring CMake 3.18.
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.
Toggle commit list-
d4775dcb...8f4e250f - 16 commits from branch
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 mainCMakeLists.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- Resolved by Daniel Hugo Campora Perez
It may be worth investigating how the C++ standard is set prior to CMake 3.18 to see if this can be worked around before an LCG with CMake 3.18+ arrives.
mentioned in merge request lhcb-core/nightlies-jenkins-scripts!90 (merged)
added 1 commit
- ebc7c4fa - Use cmake 3.18.4. Attempt to add external/.gaudi_project_ignore.
- Resolved by Daniel Hugo Campora Perez
- [2021-01-12 10:44] Validation started with lhcb-master-mr#1797
- [2021-01-22 15:14] Validation started with lhcb-master-mr#1815
- [2021-01-27 00:34] Automatic merge failed in lhcb-head#2848
Edited by Software for LHCb