Skip to content

"comm_ops.cu", line 25: error: cannot open source file "curand.h" #395

Description

@codambro

Compiling nccl-tests fails by default with the NVIDIA HPC SDK.

The HPC SDK does not include curand.h as part of the core cuda install. It is instead part of math_libs:

gpu-0001:~ # find /opt/nvidia/hpc_sdk/Linux_x86_64/ -type f -name 'curand.h'
/opt/nvidia/hpc_sdk/Linux_x86_64/26.3/math_libs/12.9/targets/x86_64-linux/include/curand.h
/opt/nvidia/hpc_sdk/Linux_x86_64/26.3/math_libs/13.1/targets/x86_64-linux/include/curand.h

Setting CUDA_HOME does not pull in math_libs and building fails.
Additionally, the nccl-tests make cfg doesn't support most standard environment variables like CXXFLAGS/NVCUFLAGS. The only workaround I found was:

export NVCC_PREPEND_FLAGS="-I/opt/nvidia/hpc_sdk/Linux_x86_64/26.3/math_libs/13.1/include"

In my opinion, this should be much cleaner. Either skip building the new benchmarks, or support arguments to nccl-tests to make it work smoother.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions