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] RMM 24.10 build script fails to build python bindings #1742

Closed
ccoulombe opened this issue Dec 3, 2024 · 3 comments · Fixed by #1749
Closed

[BUG] RMM 24.10 build script fails to build python bindings #1742

ccoulombe opened this issue Dec 3, 2024 · 3 comments · Fixed by #1749
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@ccoulombe
Copy link
Contributor

Describe the bug
Building from source v24.10 fails with cmake not finding RMMConfig.

Steps/Code to reproduce bug

git clone --recurse-submodules https://github.com/rapidsai/rmm.git --branch v24.10.00
cd rmm
module load python/3.11 cuda/12
virtualenv ~/ENV && source ~/ENV/bin/activate
pip install --upgrade pip
pip install 'rapids-build-backend>=0.3.0,<0.4.0.dev0' "scikit-build-core[pyproject]>=0.10.0"
bash build.sh

returns :

    
        Could not find a package configuration file provided by "rmm" (requested
        version 24.10.00) with any of the following names:
      
          rmmConfig.cmake
          rmm-config.cmake

Expected behavior
Build librmm, install librmm, build rmm, install rmm, successfully. The script should set where to find RMMConfig

Environment details (please complete the following information):

  • Environment location: Bare-metal
  • Method of RMM install: source
  • Please run and attach the output of the rmm/print_env.sh script to gather relevant environment details
    Relevent env. details:
***CMake***
/cvmfs/soft.computecanada.ca/custom/bin/cmake
cmake version 3.31.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

***g++***
/cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/x86_64-pc-linux-gnu/gcc-bin/12/g++
g++ (Gentoo 12.3.1_p20230526 p2) 12.3.1 20230526
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


***nvcc***
/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Core/cudacore/12.2.2/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:02:13_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0

***Python***
/tmp/coulombc/ENV/bin/python
Python 3.11.5

print_env.sh: line 58: type: conda: not found
***pip packages***
/tmp/coulombc/ENV/bin/pip
Package                          Version
-------------------------------- -----------------------
attrs                            24.2.0+computecanada
jsonschema                       4.23.0+computecanada
jsonschema_specifications        2024.10.1+computecanada
packaging                        24.2+computecanada
pathspec                         0.12.1+computecanada
pip                              24.2+computecanada
PyYAML                           6.0.2+computecanada
rapids-build-backend             0.3.2
rapids-dependency-file-generator 1.16.0
referencing                      0.35.1+computecanada
rpds_py                          0.20.0+computecanada
scikit_build_core                0.10.7+computecanada
setuptools                       75.2.0
tomlkit                          0.13.2
wheel                            0.44.0
@ccoulombe ccoulombe added ? - Needs Triage Need team to review and classify bug Something isn't working labels Dec 3, 2024
@ccoulombe
Copy link
Contributor Author

ccoulombe commented Dec 3, 2024

Specifying CMAKE_PREFIX_PATH helped/solved it:

bash build.sh rmm --cmake-args=\"-DCMAKE_PREFIX_PATH=$PWD/build/install/lib64/cmake\"

@bdice
Copy link
Contributor

bdice commented Dec 5, 2024

Thanks for reporting @ccoulombe. Can you give a little more detail on the CMAKE_PREFIX_PATH? Do you think there is a flaw in RMM's build logic that could be corrected or is it something needed for your particular system? We test build.sh in some of our builds, and I would expect the steps you followed to work. I will try to reproduce your steps on my system (outside of a conda environment) to verify that things work as expected.

@vyasr
Copy link
Contributor

vyasr commented Dec 5, 2024

From a quick glance, the build.sh script was designed for use in a conda environment and is making some invalid assumptions. In our CI we only use this script when building in a conda environment, and as a result the INSTALL_PREFIX is set to the CONDA_PREFIX, which is always on CMake's default search paths. When you use build.sh outside of conda the line I linked above is installing to $LIBRMM_BUILD_DIR/install, which is not part of the default search path. The solution would be to add -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX}; to this line.

vyasr added a commit that referenced this issue Dec 5, 2024
@vyasr vyasr mentioned this issue Dec 5, 2024
3 tasks
@rapids-bot rapids-bot bot closed this as completed in #1749 Dec 6, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in RMM Project Board Dec 6, 2024
rapids-bot bot pushed a commit that referenced this issue Dec 6, 2024
Resolves #1742

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)

URL: #1749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants