From 93d1f8e4491098f024050f139cac13cec7d433d2 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Thu, 20 May 2021 17:48:08 -0400 Subject: [PATCH 1/2] Suppress scan failures in icc gpuCI. --- ci/common/build.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/common/build.bash b/ci/common/build.bash index d53352dae..70ca61bae 100755 --- a/ci/common/build.bash +++ b/ci/common/build.bash @@ -182,6 +182,12 @@ if [[ "${BUILD_TYPE}" == "cpu" ]]; then append CTEST_FLAGS "-E ^cub|^thrust.*cuda" fi +if [[ "${CXX_TYPE}" == "icc" ]]; then + # The free version of icpc used in gpuCI seems to have a compiler bug that + # causes a scan test to produce incorrect output. + append CTEST_FLAGS "-E thrust\\.cpp\\.tbb\\.cpp..\\.test\\.scan$" +fi + if [[ -n "${@}" ]]; then for arg in "${@}" do From e6ac76aa38ecb31d5adeebcbb382cba0f98d4d77 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Fri, 21 May 2021 18:39:47 -0400 Subject: [PATCH 2/2] Passing multiple ctest -E / -R options doesn't work as expected. Passing -E overwrites all other -E settings, same with -R. Update build script to join these together into a single regex and just pass one -E and one -R. --- ci/common/build.bash | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/ci/common/build.bash b/ci/common/build.bash index 70ca61bae..8c0576a96 100755 --- a/ci/common/build.bash +++ b/ci/common/build.bash @@ -41,6 +41,18 @@ function echo_and_run_timed { time ${@:2} } +# join_delimit [value [value [...]]] +# Combine all values into a single string, separating each by a single character +# delimiter. Eg: +# foo=(bar baz kramble) +# joined_foo=$(join_delimit "|" "${foo[@]}") +# echo joined_foo # "bar|baz|kramble" +function join_delimit { + local IFS="${1}" + shift + echo "${*}" +} + ################################################################################ # VARIABLES - Set up bash and environmental variables. ################################################################################ @@ -178,21 +190,26 @@ fi append CTEST_FLAGS "--output-on-failure" +CTEST_EXCLUSION_REGEXES=() + if [[ "${BUILD_TYPE}" == "cpu" ]]; then - append CTEST_FLAGS "-E ^cub|^thrust.*cuda" + CTEST_EXCLUSION_REGEXES+=("^cub" "^thrust.*cuda") fi if [[ "${CXX_TYPE}" == "icc" ]]; then # The free version of icpc used in gpuCI seems to have a compiler bug that # causes a scan test to produce incorrect output. - append CTEST_FLAGS "-E thrust\\.cpp\\.tbb\\.cpp..\\.test\\.scan$" + CTEST_EXCLUSION_REGEXES+=("thrust\\.cpp\\.tbb\\.cpp..\\.test\\.scan$") +fi + +if [[ -n "${CTEST_EXCLUSION_REGEXES[@]}" ]]; then + CTEST_EXCLUSION_REGEX=$(join_delimit "|" "${CTEST_EXCLUSION_REGEXES[@]}") + append CTEST_FLAGS "-E ${CTEST_EXCLUSION_REGEX}" fi if [[ -n "${@}" ]]; then - for arg in "${@}" - do - append CTEST_FLAGS "-R ^${arg}$" - done + CTEST_INCLUSION_REGEX=$(join_delimit "|" "${@}") + append CTEST_FLAGS "-R ${CTEST_INCLUSION_REGEX[@]}" fi # Export variables so they'll show up in the logs when we report the environment.