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

Build issues with latest cuGraph main #4554

Closed
sg0 opened this issue Jul 25, 2024 · 4 comments · Fixed by #4563
Closed

Build issues with latest cuGraph main #4554

sg0 opened this issue Jul 25, 2024 · 4 comments · Fixed by #4563
Assignees

Comments

@sg0
Copy link

sg0 commented Jul 25, 2024

I am using 522055b and trying to build libcugraph on a cluster using instructions in README (https://github.com/rapidsai/cugraph/tree/main/cpp/tests) and encountering issues during configuration/build.

My environment:

Currently Loaded Modulefiles:
  1) gcc/10.3.0               2) cuda/12.1                3) openmpi/4.1.4            4) cmake/3.28.1             5) python/miniconda24.4.0
>> ./build.sh libcugraph cpp-mgtests 
 
 Cloning into 'cugraph-ops-src'...
 Permission denied (publickey).
 fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
 and the repository exists.
 Cloning into 'cugraph-ops-src'...
 Permission denied (publickey).
 fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
 and the repository exists.
 Cloning into 'cugraph-ops-src'...
 Permission denied (publickey).
 fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
 and the repository exists.
 -- Had to git clone more than once: 3 times.
 CMake Error at cugraph-ops-subbuild/cugraph-ops-populate-prefix/tmp/cugraph-ops-populate-gitclone.cmake:39 (message):
   Failed to clone repository: '[email protected]:rapidsai/cugraph-ops.git'

I tried to exclude cugraphops, then configuration passes, but fails during building.

>> ./build.sh --without_cugraphops libcugraph cpp-mgtests
  /people/ghos167/sources/cugraph-latest/cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh(1681): error: identifier "edge_t" is undefined
        rmm::device_uvector<edge_t>(0, handle.get_stream()), std::nullopt, std::vector<size_t>());
                            ^

  1 error detected in the compilation of "/people/ghos167/sources/cugraph-latest/cpp/src/sampling/random_walks_mg_v64_e64.cu".
@ChuckHastings
Copy link
Collaborator

@seunghwak - Looks like PR #4443 introduced a compilation error with NO_CUGRAPH_OPS. The definition of edge_t is inside the #ifdef block so can't be used in the return.

@sg0 - as a workaround, since the line before this is a CUGRAPH_FAIL, which throws an exception, I suspect you can just comment out the two-line call to std::make_tuple.

@sg0
Copy link
Author

sg0 commented Jul 30, 2024

I tried with the suggested modification, but the build still fails.

 [ghos167@deception04 cugraph-latest]$ git diff
 diff --git a/cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh b/cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh
 index 64b6aab..75a4671 100644
 --- a/cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh
 +++ b/cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh
 @@ -1677,8 +1677,8 @@ uniform_sample_and_compute_local_nbr_indices(
      std::move(local_nbr_indices), std::move(key_indices), std::move(local_frontier_sample_offsets));
  #else
    CUGRAPH_FAIL("unimplemented.");
 -  return std::make_tuple(
 -    rmm::device_uvector<edge_t>(0, handle.get_stream()), std::nullopt, std::vector<size_t>());
 +  // return std::make_tuple(
 +  //  rmm::device_uvector<edge_t>(0, handle.get_stream()), std::nullopt, std::vector<size_t>());
  #endif
  }
[347/1050] Building CXX object CMakeFiles/cugraph_c.dir/src/c_api/pagerank.cpp.o
FAILED: CMakeFiles/cugraph_c.dir/src/c_api/pagerank.cpp.o
/share/apps/gcc/10.3.0/bin/g++ -DCUDA_API_PER_THREAD_DEFAULT_STREAM -DCUTLASS_ENABLE_CUDNN=1 -DCUTLASS_NAMESPACE=raft_cutlass -DFMT_HEADER_ONLY=1 -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -DRAFT_SYSTEM_LITTLE_ENDIAN=1 -DSPDLOG_FMT_EXTERNAL -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_DISABLE_ABI_NAMESPACE -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -DTHRUST_IGNORE_ABI_NAMESPACE_ERROR -Dcugraph_c_EXPORTS -I/people/ghos167/sources/cugraph-latest/cpp/src -I/people/ghos167/sources/cugraph-latest/cpp/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/rmm-src/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/cccl-src/thrust/thrust/cmake/../.. -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/cccl-src/libcudacxx/lib/cmake/libcudacxx/../../../include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/cccl-src/cub/cub/cmake/../.. -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/spdlog-src/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/nvtx3-src/c/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/cuco-src/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/nvidiacutlass-src/include -I/people/ghos167/sources/cugraph-latest/cpp/build/_deps/nvidiacutlass-build/include -I/share/apps/cuda/12.3/include -isystem /share/apps/cuda/12.3/targets/x86_64-linux/include -O3 -DNDEBUG -std=gnu++17 -fPIC -Werror -Wno-error=deprecated-declarations -Wno-deprecated-declarations -DRAFT_HIDE_DEPRECATION_WARNINGS -DNO_CUGRAPH_OPS -MD -MT CMakeFiles/cugraph_c.dir/src/c_api/pagerank.cpp.o -MF CMakeFiles/cugraph_c.dir/src/c_api/pagerank.cpp.o.d -o CMakeFiles/cugraph_c.dir/src/c_api/pagerank.cpp.o -c /people/ghos167/sources/cugraph-latest/cpp/src/c_api/pagerank.cpp
In file included from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/core.h:2920,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/spdlog-src/include/spdlog/fmt/fmt.h:31,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/spdlog-src/include/spdlog/common.h:50,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/detail/callback_sink.hpp:22,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/logger-inl.hpp:34,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/logger.hpp:22,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/resources.hpp:21,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/resource/comms.hpp:20,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/device_resources.hpp:23,
                 from /people/ghos167/sources/cugraph-latest/cpp/build/_deps/raft-src/cpp/include/raft/core/handle.hpp:19,
                 from /people/ghos167/sources/cugraph-latest/cpp/include/cugraph/utilities/dataframe_buffer.hpp:20,
                 from /people/ghos167/sources/cugraph-latest/cpp/include/cugraph/edge_property.hpp:19,
                 from /people/ghos167/sources/cugraph-latest/cpp/include/cugraph/graph_view.hpp:20,
                 from /people/ghos167/sources/cugraph-latest/cpp/include/cugraph/graph.hpp:18,
                 from /people/ghos167/sources/cugraph-latest/cpp/src/c_api/graph.hpp:23,
                 from /people/ghos167/sources/cugraph-latest/cpp/src/c_api/pagerank.cpp:19:
In function ‘fmt::v10::detail::format_decimal_result<Char*> fmt::v10::detail::format_decimal(Char*, UInt, int) [with Char = char; UInt = unsigned int]’,
    inlined from ‘constexpr fmt::v10::detail::format_decimal_result<Iterator> fmt::v10::detail::format_decimal(Iterator, UInt, int) [with Char = char; UInt = unsigned int; Iterator = fmt::v10::appender; typename std::enable_if<(! std::is_pointer<typename std::remove_cv<typename std::remove_reference<_Arg>::type>::type>::value), int>::type <anonymous> = 0]’ at /people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/format.h:1371:28,
    inlined from ‘void fmt::v10::detail::format_hexfloat(Float, int, fmt::v10::detail::float_specs, fmt::v10::detail::buffer<char>&) [with Float = double; typename std::enable_if<(! std::integral_constant<bool, (std::numeric_limits<_Tp>::digits == 106)>::value), int>::type <anonymous> = 0]’ at /people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/format.h:3270:23:
/people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/format.h:1327:11: error: writing 2 bytes into a region of size 0 [-Werror=stringop-overflow=]
 1327 |     memcpy(dst, src, 2);
      |     ~~~~~~^~~~~~~~~~~~~
/people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/format.h: In function ‘void fmt::v10::detail::format_hexfloat(Float, int, fmt::v10::detail::float_specs, fmt::v10::detail::buffer<char>&) [with Float = double; typename std::enable_if<(! std::integral_constant<bool, (std::numeric_limits<_Tp>::digits == 106)>::value), int>::type <anonymous> = 0]’:
/people/ghos167/sources/cugraph-latest/cpp/build/_deps/fmt-src/include/fmt/format.h:1370:8: note: at offset -2 to object ‘buffer’ with size 10 declared here
 1370 |   Char buffer[digits10<UInt>() + 1] = {};
      |        ^~~~~~
cc1plus: all warnings being treated as errors
[378/1050] Building CUDA object CMakeFiles/cugraph.dir/src/structure/create_graph_from_edgelist_mg_v32_e64.cu.o
ninja: build stopped: subcommand failed.

@ChuckHastings
Copy link
Collaborator

We believe these errors are due to your build environment. Our build documentation is out-of-date. All of RAPIDS now requires gcc 11.4 or greater, and nvcc 11.8 or greater. We are using compiler features that are not supported in the older compilers.

I have created #4564 to address the documentation issue.

rapids-bot bot pushed a commit that referenced this issue Jul 30, 2024
Closes #4554, user bug found building cugraph 24.10

Authors:
  - Seunghwa Kang (https://github.com/seunghwak)

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)

URL: #4563
@ChuckHastings
Copy link
Collaborator

This got closed by the PR that fixed the bug that your test revealed.

If you continue to have issues building from source after upgrading to a newer set of compilers (gcc 11.4+ and nvcc 11.8+), please open a new issue and we will investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants