Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: A few parallel algorithms have started hanging at runtime after commit 35df3a #3594

Open
1 task done
zkhatami opened this issue Jan 29, 2025 · 0 comments
Open
1 task done
Assignees
Labels
bug Something isn't working right.

Comments

@zkhatami
Copy link

Is this a duplicate?

Type of Bug

Silent Failure

Component

Thrust

Describe the bug

A few parallel algorithms have started hanging at runtime after commit 35df3a9.
For example:

#include <execution>
#include <algorithm>
#include <ranges>

constexpr int N = 1000;

int main() {
  auto data = std::views::iota(0, N);
  auto result = std::find_if_not(std::execution::par, data.begin(), data.end(),
      [](int x) { return x < N/2; });
}

when compiling this test with:

nvc++ --c++20 -stdpar -Ofast find_if_not.cpp; ./a.out

runtime hangs here:

at /proj/nv/Linux_x86_64/270541-dev/compilers/include-stdpar/thrust/iterator/detail/zip_iterator_base.h:155 in thrust::THRUST_300000_SM_70_NVHPC_NS::detail::tuple_impl_specific::tuple_for_each_helper<thrust::THRUST_300000_SM_70_NVHPC_NS::detail::advance_iterator<long>, thrust::THRUST_300000_SM_70_NVHPC_NS::transform_iterator<cuda::std::__4::__not_fn_t<main::{lambda(int)#1}>, std::ranges::iota_view<int, int>::_Iterator, bool, bool>, thrust::THRUST_300000_SM_70_NVHPC_NS::counting_iterator<long, thrust::THRUST_300000_SM_70_NVHPC_NS::use_default, thrust::THRUST_300000_SM_70_NVHPC_NS::use_default, thrust::THRUST_300000_SM_70_NVHPC_NS::use_default> > inlined from iterator_facade.h:427

I suspect the bug is in the iterators that replaced thrust::cuda_cub iterators in that commit.

How to Reproduce

nvc++ --c++20 -stdpar -Ofast find_if_not.cpp; ./a.out

Expected behavior

To verify that the runtime hang is resolved.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@zkhatami zkhatami added the bug Something isn't working right. label Jan 29, 2025
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jan 29, 2025
@bernhardmgruber bernhardmgruber self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Status: Todo
Development

No branches or pull requests

2 participants