From 60e0ac5bdedd146089d612f1ba18f9298c6c4e40 Mon Sep 17 00:00:00 2001 From: Simeon Ehrig Date: Tue, 29 Aug 2023 08:27:41 +0200 Subject: [PATCH] enable GCC in the Gitlab CI - set libstdc++ for all backends --- .github/workflows/ci.yml | 9 +++------ script/job_generator/generate_job_yaml.py | 14 ++++++++++++++ script/job_generator/job_generator.py | 4 ++-- script/job_generator/versions.py | 8 ++++++++ 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cff5b964fc0..134e775147f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,15 +151,12 @@ jobs: # g++ # We can not enable UBSan when using gcc because it does not have a -fsanitize-blacklist option to suppress errors in boost etc. # gcc 7 ASan introduced 'stack-use-after-scope' which is triggered by GOMP_parallel + # TODO: keep jobs until GitLab CI supports: + # - disable CMAKE_CXX_EXTENSIONS=OFF + # - Ubuntu 22.04 - name: linux_gcc-9_debug os: ubuntu-20.04 env: {CXX: g++, CC: gcc, ALPAKA_CI_GCC_VER: 9, ALPAKA_CI_STDLIB: libstdc++, CMAKE_BUILD_TYPE: Debug, ALPAKA_BOOST_VERSION: 1.74.0, ALPAKA_CI_CMAKE_VER: 3.22.6, OMP_NUM_THREADS: 4, ALPAKA_CI_DOCKER_BASE_IMAGE_NAME: "ubuntu:20.04", CMAKE_CXX_EXTENSIONS: OFF} - - name: linux_gcc-10_release - os: ubuntu-20.04 - env: {CXX: g++, CC: gcc, ALPAKA_CI_GCC_VER: 10, ALPAKA_CI_STDLIB: libstdc++, CMAKE_BUILD_TYPE: Release, ALPAKA_BOOST_VERSION: 1.75.0, ALPAKA_CI_CMAKE_VER: 3.23.5, OMP_NUM_THREADS: 2, ALPAKA_CI_DOCKER_BASE_IMAGE_NAME: "ubuntu:20.04"} - - name: linux_gcc-11_debug - os: ubuntu-20.04 - env: {CXX: g++, CC: gcc, ALPAKA_CI_GCC_VER: 11, ALPAKA_CI_STDLIB: libstdc++, CMAKE_BUILD_TYPE: Debug, ALPAKA_BOOST_VERSION: 1.78.0, ALPAKA_CI_CMAKE_VER: 3.22.6, OMP_NUM_THREADS: 2, ALPAKA_CI_DOCKER_BASE_IMAGE_NAME: "ubuntu:20.04"} - name: linux_gcc-12_release_c++20 os: ubuntu-22.04 env: {CXX: g++, CC: gcc, ALPAKA_CI_GCC_VER: 12, ALPAKA_CI_STDLIB: libstdc++, CMAKE_BUILD_TYPE: Release, ALPAKA_BOOST_VERSION: 1.80.0, ALPAKA_CI_CMAKE_VER: 3.24.4, OMP_NUM_THREADS: 2, ALPAKA_CI_DOCKER_BASE_IMAGE_NAME: "ubuntu:22.04", alpaka_CXX_STANDARD: 20, alpaka_USE_MDSPAN: "FETCH"} diff --git a/script/job_generator/generate_job_yaml.py b/script/job_generator/generate_job_yaml.py index e7140ab7ccd8..79f48f6cafb9 100644 --- a/script/job_generator/generate_job_yaml.py +++ b/script/job_generator/generate_job_yaml.py @@ -300,6 +300,10 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]: variables[ALPAKA_ACC_GPU_HIP_ENABLE] = "OFF" variables["alpaka_ACC_GPU_HIP_ONLY_MODE"] = "OFF" variables[ALPAKA_ACC_SYCL_ENABLE] = "OFF" + # TODO(SimeonEhrig): set libstdc++ for all backends + # support for different standard c++ libraries is planed + # https://github.com/alpaka-group/alpaka-job-matrix-library/issues/9 + variables["ALPAKA_CI_STDLIB"] = "libstdc++" if job[MDSPAN][VERSION] == ON_VER: variables["ALPAKA_TEST_MDSPAN"] = "ON" else: @@ -307,6 +311,16 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]: append_backend_variables(variables, job) + if job[DEVICE_COMPILER][NAME] == GCC: + variables["CC"] = "gcc" + variables["CXX"] = "g++" + variables["ALPAKA_CI_GCC_VER"] = job[HOST_COMPILER][VERSION] + if ( + ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE in job + and job[ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE][VERSION] == ON_VER + ): + variables["ALPAKA_CI_TBB_VERSION"] = "2021.10.0" + if job[DEVICE_COMPILER][NAME] == HIPCC: variables["CC"] = "clang" variables["CXX"] = "clang++" diff --git a/script/job_generator/job_generator.py b/script/job_generator/job_generator.py index f38a90d56f29..97cf7b8cca7e 100644 --- a/script/job_generator/job_generator.py +++ b/script/job_generator/job_generator.py @@ -112,11 +112,11 @@ def get_args() -> argparse.Namespace: enable_clang_cuda = True parameters[HOST_COMPILER] = get_compiler_versions(clang_cuda=enable_clang_cuda) parameters[DEVICE_COMPILER] = get_compiler_versions(clang_cuda=enable_clang_cuda) - # TODO(SimeonEhrig): remove GCC and Clang from DEVICE_COMPILER to disable CPU accelerator + # TODO(SimeonEhrig): remove Clang from DEVICE_COMPILER to disable CPU accelerator # Backends parameters[DEVICE_COMPILER] = list( filter( - lambda compiler: compiler[NAME] != GCC and compiler[NAME] != CLANG, + lambda compiler: compiler[NAME] != CLANG, parameters[DEVICE_COMPILER], ) ) diff --git a/script/job_generator/versions.py b/script/job_generator/versions.py index d573eca07a12..2f2251306d25 100644 --- a/script/job_generator/versions.py +++ b/script/job_generator/versions.py @@ -33,6 +33,14 @@ # There are special cases for ALPAKA_ACC_GPU_CUDA_ENABLE and ALPAKA_ACC_GPU_HIP_ENABLE # which have to be combined with nvcc and hipcc versions. BACKENDS: [ + # gcc and clang + [ + ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE, + ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE, + ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE, + ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE, + ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE, + ], # ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE, # nvcc [