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 Oct 21, 2024
1 parent 37ed043 commit fa0e939
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 20 deletions.
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'
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: "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 300 -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 300 -E eigensolver -L {{LABEL}}"
fi

JOBS=""
Expand Down
33 changes: 33 additions & 0 deletions ci/docker/tsan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# 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'
- 'cxxflags="-fsanitize=thread -fno-omit-frame-pointer"'
- 'ldflags="-fsanitize=thread"'

0 comments on commit fa0e939

Please sign in to comment.