Skip to content

Commit

Permalink
Debugging: include preliminary job from separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 19, 2024
1 parent 6e4b089 commit cf2be87
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 39 deletions.
1 change: 1 addition & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pr:
- Docs
- .github/workflows/**
- .azure-pipelines.yml
- .pre-commit-config.yaml

jobs:
- job:
Expand Down
38 changes: 1 addition & 37 deletions .github/workflows/clang_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,8 @@ concurrency:
cancel-in-progress: true

jobs:

skip_checks:
name: Skip checks?
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run PR analysis script
run: |
.github/workflows/scripts/check_diff.sh \
${{ github.event.pull_request.head.ref }} \
${{ github.event.pull_request.base.ref }} \
${{ github.event.pull_request.head.repo.clone_url }}
outputs:
skip: ${{ env.SKIP_CHECKS }}

uses: ./.github/workflows/skip_checks.yml
build_UB_sanitizer:
name: Clang UB sanitizer
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -58,11 +42,9 @@ jobs:
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
export CXX=$(which clang++-17)
export CC=$(which clang-17)
export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all"
cmake -S . -B build \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
Expand All @@ -75,27 +57,20 @@ jobs:
-DWarpX_PRECISION=SINGLE \
-DWarpX_PARTICLE_PRECISION=SINGLE
cmake --build build -j 4
ccache -s
du -hs ~/.cache/ccache
- name: run with UB sanitizer
run: |
# We need these two lines because these tests run inside a docker container
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMP_NUM_THREADS=2
#MPI implementations often leak memory
export "ASAN_OPTIONS=detect_leaks=0"
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d
build_thread_sanitizer:
name: Clang thread sanitizer
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -125,11 +100,9 @@ jobs:
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
export CXX=$(which clang++-17)
export CC=$(which clang-17)
export CXXFLAGS="-fsanitize=thread"
cmake -S . -B build \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
Expand All @@ -143,7 +116,6 @@ jobs:
-DWarpX_PRECISION=DOUBLE \
-DWarpX_PARTICLE_PRECISION=DOUBLE
cmake --build build -j 4
cmake -S . -B build_EB \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
Expand All @@ -157,30 +129,22 @@ jobs:
-DWarpX_PRECISION=DOUBLE \
-DWarpX_PARTICLE_PRECISION=DOUBLE
cmake --build build_EB -j 4
ccache -s
du -hs ~/.cache/ccache
- name: run with thread sanitizer
run: |
export PMIX_MCA_gds=hash
export TSAN_OPTIONS='ignore_noninstrumented_modules=1'
export ARCHER_OPTIONS="verbose=1"
# We need these two lines because these tests run inside a docker container
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMP_NUM_THREADS=2
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d warpx.serialize_initial_conditions = 0
git clone https://github.com/ECP-WarpX/warpx-data ../warpx-data
cd Examples/Tests/embedded_circle
ulimit -c unlimited
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_test_2d_embedded_circle warpx.serialize_initial_conditions = 0
4 changes: 3 additions & 1 deletion .github/workflows/scripts/check_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ base_ref=${2}
clone_url=${3}

# Set paths to ignore (FIXME update this before merging)
paths_ignore="^(Docs|\.github)/|\.azure-pipelines\.yml$"
paths_ignore="^(Docs|\.github)/|\.azure-pipelines\.yml$|\.pre-commit-config\.yaml$"

# Add forked repository as remote
git remote add fork ${clone_url}
Expand All @@ -29,7 +29,9 @@ skip=$(grep -v -E "${paths_ignore}" check_diff.txt)

# Set an environment variable based on the output
if [ -z "$skip" ]; then
echo "skip=true"
echo "SKIP_CHECKS=true" >> $GITHUB_ENV
else
echo "skip=false"
echo "SKIP_CHECKS=false" >> $GITHUB_ENV
fi
19 changes: 19 additions & 0 deletions .github/workflows/skip_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Skip checks
on:
workflow_call:
jobs:
skip_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run PR analysis script
run: |
.github/workflows/scripts/check_diff.sh \
${{ github.event.pull_request.head.ref }} \
${{ github.event.pull_request.base.ref }} \
${{ github.event.pull_request.head.repo.clone_url }}
outputs:
skip: ${{ env.SKIP_CHECKS }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: mixed-line-ending
- id: check-json
- id: check-toml
- id: check-yaml
#- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=40']
- id: requirements-txt-fixer
Expand Down

0 comments on commit cf2be87

Please sign in to comment.