Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

NVBug 3262468: Bogus data produced in CUDA 11(.1) by thrust::sort_by_key with custom comparison operator over two (zipped) key arrays #1341

@Oblomov

Description

@Oblomov

Hello,

while testing GPUSPH on CUDA 11.1 I discovered that the thrust::sort_by_key procedure that we use to sort the particle indices is now producing bogus data. The sort uses a custom comparator that fetches data from two different arrays (using zip_iterator etc). The sort results in one of the (sorted) key arrays being clobbered with invalid data.

I am currently in the process of finding a minimal test case, but in the mean time the bug can be observed in action on the cuda11-thrust-sort-bug of GPUSPH, by running

make DamBreak3D && ./DamBreak3D --maxiter 1 | grep '64656 255 '

from the git working directly. This should produce no results (as it does on CUDA 10) if the sort is correct, but it results in numerous hits (all clobbered entries with bogus values) in CUDA 11.

Thanks for looking into this,

Metadata

Metadata

Assignees

No one assigned

    Labels

    nvbugHas an associated internal NVIDIA NVBug.type: bug: compilerBug in a compiler, not this library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions