Skip to content

[Bug] MSCCLPP_USE_IB=OFF still compiles ibverbs_wrapper.cc and requires infiniband/verbs.h #821

Description

@xsshao

When building with -DMSCCLPP_USE_IB=OFF, the build still compiles src/core/ibverbs_wrapper.cc, which unconditionally includes <infiniband/verbs.h>.

This makes a no-IB build fail on systems without libibverbs development headers, even though the docs describe MSCCLPP_USE_IB=OFF as disabling InfiniBand support.

Configure command:

cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=$HOME/local/mscclpp \
  -DMSCCLPP_GPU_ARCHS=90 \
  -DMSCCLPP_BYPASS_GPU_CHECK=ON \
  -DMSCCLPP_USE_CUDA=ON \
  -DMSCCLPP_USE_IB=OFF \
  -DMSCCLPP_BUILD_PYTHON_BINDINGS=OFF \
  ..

Build error:

In file included from /path/to/mscclpp/src/core/ibverbs_wrapper.cc:4:
/path/to/mscclpp/src/core/include/ibverbs_wrapper.hpp:7:10: fatal error: infiniband/verbs.h: No such file or directory
    7 | #include <infiniband/verbs.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

A local workaround that fixes the build is adding the following in src/core/CMakeLists.txt:

if(NOT MSCCLPP_USE_IB)
    list(FILTER SOURCES EXCLUDE REGEX ".*/ibverbs_wrapper\\.cc$")
    list(FILTER SOURCES EXCLUDE REGEX ".*/mlx5dv_wrapper\\.cc$")
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions