Skip to content

Commit

Permalink
Add thread sanitizer CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Feb 20, 2024
1 parent c515e43 commit bbfb8af
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include:
- local: 'ci/cpu/asan_ubsan_lsan.yml'
# - local: 'ci/cpu/asan_ubsan_lsan.yml'
- local: 'ci/cpu/tsan.yml'
# - local: 'ci/cpu/clang12_release.yml'
# - local: 'ci/cpu/clang13_release_cxx20.yml'
# - local: 'ci/cpu/clang14_release_stdexec.yml'
Expand Down
34 changes: 34 additions & 0 deletions ci/cpu/tsan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
include:
- local: 'ci/common-ci.yml'

cpu tsan deps:
extends: .build_deps_common
variables:
EXTRA_APTGET: "clang-15 libomp-15-dev"
COMPILER: clang@15
USE_MKL: "ON"
SPACK_ENVIRONMENT: ci/docker/tsan.yaml
BUILD_IMAGE: $CSCS_REGISTRY_PATH/cpu-tsan/build

cpu tsan build:
extends:
- .build_common
- .build_for_daint-mc
needs:
- cpu tsan deps
variables:
DEPLOY_IMAGE: $CSCS_REGISTRY_PATH/cpu-tsan/deploy:$CI_COMMIT_SHA
# For symbolizing stacktraces with llvm-symbolizer
EXTRA_APTGET_DEPLOY: "llvm-15"

cpu tsan test:
extends: .run_common
needs:
- cpu tsan build
variables:
# Override use of libSegFault, not necessary with sanitizers
LD_PRELOAD: ""
trigger:
include:
- artifact: pipeline.yml
job: cpu tsan build
29 changes: 29 additions & 0 deletions ci/docker/tsan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# 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 cxxflags="-fsanitize=thread -fno-omit-frame-pointer" ldflags="-fsanitize=thread -shared-libsan" +miniapps +ci-test

packages:
all:
variants:
- 'build_type=RelWithDebInfo'
pika:
require:
- 'malloc=system'

0 comments on commit bbfb8af

Please sign in to comment.