Skip to content

[BUG]: CCCL 3 in CUDA 13.3 compilation on Windows of omp.h #9532

Description

@correaa

Is this a duplicate?

Type of Bug

Silent Failure

Component

Thrust

Describe the bug

Apparently, this line generates a catastrophic error when compiling CCCL on Windows.

https://github.com/NVIDIA/cccl/blob/main/thrust/thrust/system/omp/detail/scan.h#L79

I think the problem is that in MSCV, max is a macro.
I am not an expert on Windows compilation, but I solved similar problems by adding an extra layer of parentheses around the max function. (in this case (cuda::std::max)(a, b).)

Here is the error being triggered: https://gitlab.com/correaa/boost-multi/-/jobs/14931004188#L3088

How to Reproduce

all details are here: https://gitlab.com/correaa/boost-multi/-/jobs/14931004188

Expected behavior

should compile file. It compiled fine for previous version of CUDA or 13.3 on Linux (https://gitlab.com/correaa/boost-multi/-/jobs/14913212883)

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

I have this:

-- Building for: Visual Studio 17 2022
current binary directory: C:/Gitlab-Runner/builds/t3_1sV2uA/0/correaa/boost-multi/build
-- The CXX compiler identification is MSVC 19.44.35228.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost.Multi: standalone mode ON
current install prefix directory: C:/Program Files (x86)/multi
-- The CUDA compiler identification is NVIDIA 13.3.33 with host compiler MSVC 19.44.35228.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.3/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Thrust 3.3.3 (C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.3/include/cccl)
CMake Warning at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "TBB", but
CMake did not find one.

Metadata

Metadata

Assignees

Labels

needs triageIssues that require the team's attention

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions