Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thread sanitizer CI pipeline #1101

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
include:
- local: 'ci/cpu/asan_ubsan_lsan.yml'
- local: 'ci/cpu/clang15_release_cxx20.yml'
- local: 'ci/cpu/clang15_release_stdexec.yml'
- local: 'ci/cpu/clang15_release.yml'
- local: 'ci/cpu/clang16_release.yml'
- local: 'ci/cpu/clang18_release.yml'
- local: 'ci/cpu/gcc11_release_stdexec.yml'
- local: 'ci/cpu/gcc11_debug_stdexec.yml'
- local: 'ci/cpu/gcc12_release_cxx20.yml'
- local: 'ci/cpu/gcc13_codecov.yml'
- local: 'ci/cpu/gcc13_release.yml'
- local: 'ci/cuda/gcc11_release.yml'
- local: 'ci/cuda/gcc11_release_scalapack.yml'
- local: 'ci/cuda/gcc11_codecov.yml'
- local: 'ci/cuda/gcc11_debug_scalapack.yml'
- local: 'ci/cuda/gcc13_release_stdexec.yml'
- local: 'ci/rocm/clang14_release.yml'
- local: 'ci/rocm/clang14_release_stdexec.yml'
- local: 'ci/cpu/tsan.yml'
# - local: 'ci/cpu/clang15_release_cxx20.yml'
# - local: 'ci/cpu/clang15_release_stdexec.yml'
# - local: 'ci/cpu/clang15_release.yml'
# - local: 'ci/cpu/clang16_release.yml'
# - local: 'ci/cpu/clang18_release.yml'
# - local: 'ci/cpu/gcc11_release_stdexec.yml'
# - local: 'ci/cpu/gcc11_debug_stdexec.yml'
# - local: 'ci/cpu/gcc12_release_cxx20.yml'
# - local: 'ci/cpu/gcc13_codecov.yml'
# - local: 'ci/cpu/gcc13_release.yml'
# - local: 'ci/cuda/gcc11_release.yml'
# - local: 'ci/cuda/gcc11_release_scalapack.yml'
# - local: 'ci/cuda/gcc11_codecov.yml'
# - local: 'ci/cuda/gcc11_debug_scalapack.yml'
# - local: 'ci/cuda/gcc13_release_stdexec.yml'
# - local: 'ci/rocm/clang14_release.yml'
# - local: 'ci/rocm/clang14_release_stdexec.yml'
2 changes: 1 addition & 1 deletion ci/common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stages:
reports:
dotenv: build.env
variables:
SPACK_SHA: 0905edf592752742eb4ddab3a528d3aee8f92930
SPACK_SHA: develop-2024-10-06
SPACK_DLAF_REPO: ./spack
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
Expand Down
35 changes: 35 additions & 0 deletions ci/cpu/tsan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
include:
- local: 'ci/common-ci.yml'

cpu tsan deps:
extends: .build_deps_common
variables:
EXTRA_APTGET: "clang-18 libclang-rt-18-dev libomp-18-dev"
COMPILER: clang@18
SPACK_ENVIRONMENT: ci/docker/tsan.yaml
USE_MKL: "ON"
DEPS_IMAGE: $CSCS_REGISTRY_PATH/cpu-tsan/deps

cpu tsan build:
extends:
- .build_common
- .build_for_daint-mc
needs:
- cpu tsan deps
variables:
DLAF_IMAGE: $CSCS_REGISTRY_PATH/cpu-tsan/dlaf:$CI_COMMIT_SHA

cpu tsan test:
extends: .run_common
needs:
- cpu tsan build
variables:
TSAN_OPTIONS: "ignore_noninstrumented_modules=1:halt_on_error=1:history_size=0"
PIKA_SMALL_STACK_SIZE: "0x100000"
PIKA_MEDIUM_STACK_SIZE: "0x100000"
# Override use of libSegFault, not necessary with sanitizers
LD_PRELOAD: ""
trigger:
include:
- artifact: pipeline.yml
job: cpu tsan build
6 changes: 3 additions & 3 deletions ci/ctest_to_gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ JOB_TEMPLATE="
USE_MPI: 'YES'
DISABLE_AFTER_SCRIPT: 'YES'
DLAF_HDF5_TEST_OUTPUT_PATH: \$CI_PROJECT_DIR
script: mpi-ctest -L {{LABEL}}
script: mpi-ctest --timeout 420 -E eigensolver -L {{LABEL}}
artifacts:
paths:
- codecov-reports/"
Expand Down Expand Up @@ -93,14 +93,14 @@ JOB_TEMPLATE="
variables:
SLURM_CPUS_PER_TASK: {{CPUS_PER_TASK}}
SLURM_NTASKS: {{NTASKS}}
SLURM_TIMELIMIT: '20:00'
SLURM_TIMELIMIT: '2:00:00'
SLURM_UNBUFFEREDIO: 1
SLURM_WAIT: 0
PULL_IMAGE: 'YES'
USE_MPI: 'YES'
DISABLE_AFTER_SCRIPT: 'YES'
DLAF_HDF5_TEST_OUTPUT_PATH: \$CI_PROJECT_DIR
script: mpi-ctest -L {{LABEL}}"
script: mpi-ctest --timeout 420 -E eigensolver -L {{LABEL}}"
fi

JOBS=""
Expand Down
34 changes: 34 additions & 0 deletions ci/docker/tsan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Distributed Linear Algebra with Future (DLAF)
#
# Copyright (c) 2018-2024, ETH Zurich
# All rights reserved.
#
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause
#

spack:
include:
- /spack_environment/common.yaml

view: false
concretizer:
unify:
true

specs:
- dla-future@master build_type=Debug cxxflags="-fsanitize=thread -fno-omit-frame-pointer" ldflags="-fsanitize=thread" +miniapps +ci-test

packages:
all:
variants:
- 'build_type=RelWithDebInfo'
pika:
require:
- 'build_type=Debug'
- 'malloc=system'
- '+sanitizers'
- '+stdexec'
- 'cxxflags="-fsanitize=thread -fno-omit-frame-pointer"'
- 'ldflags="-fsanitize=thread"'
Loading