Skip to content

Commit

Permalink
Merge pull request #1953 from glotzerlab/compute-sanitizer
Browse files Browse the repository at this point in the history
Run `compute-sanitizer` on CI checks
  • Loading branch information
joaander authored Nov 26, 2024
2 parents 21d1328 + 7f22fd2 commit 742fb5d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,21 @@ jobs:
env:
_HOOMD_DISALLOW_CUPY_: 1

### compute-sanitizer checks: These checks are slow, so run them only when validation is
# requested, but no on the actual long validation tests. Every class's basic test should ensure
# that the GPU kernel is called for at least a few timesteps for these checks to be effective.
- name: Run memcheck
if: ${{ contains(inputs.config, 'cuda') && contains(github.event.pull_request.labels.*.name, 'validate') && inputs.validate == 'true' }}
run: compute-sanitizer --tool memcheck --error-exitcode 1 python3 -m pytest --pyargs hoomd -x -v -ra --durations=0 --durations-min=0.1

- name: Run racecheck
if: ${{ contains(inputs.config, 'cuda') && contains(github.event.pull_request.labels.*.name, 'validate') && inputs.validate == 'true' }}
run: compute-sanitizer --tool racecheck --error-exitcode 1 python3 -m pytest --pyargs hoomd -x -v -ra --durations=0 --durations-min=0.1

- name: Run synccheck
if: ${{ contains(inputs.config, 'cuda') && contains(github.event.pull_request.labels.*.name, 'validate') && inputs.validate == 'true' }}
run: compute-sanitizer --tool synccheck --error-exitcode 1 python3 -m pytest --pyargs hoomd -x -v -ra --durations=0 --durations-min=0.1

### Validation tests
- name: Run pytest -m validate (serial)
if: ${{ !contains(inputs.config, 'mpi') && contains(github.event.pull_request.labels.*.name, 'validate') && inputs.validate == 'true' }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Change Log
* Read after write hazard in the GPU implementation of ``Dipole``, ``ALJ``, and all ``Patchy``
potentials in ``hoomd.md.pair.ansiso``
(`#1944 <https://github.com/glotzerlab/hoomd-blue/pull/1944>`__).
* Read after write hazard in the GPU implementation of ``hoomd.md.mesh.conservation.Volume``
(`#1953 <https://github.com/glotzerlab/hoomd-blue/pull/1953>`__).

*Added*

Expand Down
1 change: 1 addition & 0 deletions hoomd/md/VolumeConservationMeshForceComputeGPU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ __global__ void gpu_volume_reduce_partial_sum_kernel(Scalar* d_sum,
if (threadIdx.x < offs)
volume_sdata[threadIdx.x] += volume_sdata[threadIdx.x + offs];
offs >>= 1;
__syncthreads();
}

// everybody sums up sum2K
Expand Down

0 comments on commit 742fb5d

Please sign in to comment.