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

CMake cannot locate libraries and includes #8

Closed
ghost opened this issue Jun 17, 2021 · 25 comments
Closed

CMake cannot locate libraries and includes #8

ghost opened this issue Jun 17, 2021 · 25 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2021

I found and read your article at PingCAP. I was impressed and I would like to compile. However, when I tried, I got the following error:

-- Enabling the GLIBCXX11 ABI
-- Building CURA targeting GPU
-- Finding RAPIDJSON
-- RapidJSON found. Headers: /home/yujinkim/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/../../include
-- Finding ARROW
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/cudf_dev
-- Using ARROW: /home/yujinkim/miniconda3/envs/cudf_dev/include : /home/yujinkim/miniconda3/envs/cudf_dev/lib/libarrow.so
-- Finding CUDA
-- CUDA_VERSION_MAJOR: 11
-- CUDA_VERSION_MINOR: 1
-- CUDA_VERSION: 11.1
GPU_ARCHS = 60;70;75;80
-- Using CUDA: /usr/local/cuda/include : /usr/local/cuda/lib64/stubs/libcuda.so
-- Using CUDART: /usr/local/cuda/lib64/libcudart.so
-- Finding CUDF
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/cudf_dev
-- Using CUDF: /home/yujinkim/miniconda3/envs/cudf_dev/include : /home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf.so;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND
-- Using LIBCUDACXX: CUDF_LIBCUDACXX_INCLUDE_DIR-NOTFOUND
-- GTEST: Enabling the GLIBCXX11 ABI
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yujinkim/cura/build/googletest
-- GTEST BUILD: Enabling Parallel CMake build with all threads
[ 12%] Performing update step for 'GoogleTest'
[ 25%] No patch step for 'GoogleTest'
[ 37%] Performing configure step for 'GoogleTest'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yujinkim/cura/build/googletest/build
[ 50%] Performing build step for 'GoogleTest'
[ 18%] Built target gtest
[ 54%] Built target gmock_main
[ 81%] Built target gmock
[100%] Built target gtest_main
[ 62%] Performing install step for 'GoogleTest'
[ 18%] Built target gtest
[ 54%] Built target gmock_main
[ 81%] Built target gmock
[100%] Built target gtest_main
Install the project...
-- Install configuration: ""
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/lib/libgmock.a
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/lib/libgmock_main.a
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/gmock-generated-internal-utils.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/gmock-generated-internal-utils.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/gmock-port.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/gmock-internal-utils.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/custom
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/custom/gmock-generated-actions.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/custom/gmock-generated-actions.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/custom/gmock-port.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/internal/custom/gmock-matchers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-matchers.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-more-actions.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-function-mockers.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-more-matchers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-cardinalities.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-actions.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-actions.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-function-mockers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-spec-builders.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-nice-strict.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-matchers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-matchers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-generated-nice-strict.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gmock/gmock-actions.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/lib/libgtest.a
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/lib/libgtest_main.a
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-death-test-internal.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-linked_ptr.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-type-util.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-port-arch.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-tuple.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-type-util.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-param-util-generated.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-port.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-param-util-generated.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-internal.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-tuple.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-string.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-filepath.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/gtest-param-util.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/custom
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/custom/gtest-port.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/custom/gtest.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/internal/custom/gtest-printers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-test-part.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-death-test.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest_pred_impl.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-spi.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-message.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-param-test.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-printers.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-typed-test.h
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest-param-test.h.pump
-- Up-to-date: /home/yujinkim/cura/build/googletest/install/include/gtest/gtest_prod.h
[ 75%] Completed 'GoogleTest'
[100%] Built target GoogleTest
-- GoogleTest installed here: /home/yujinkim/cura/build/googletest/install
-- Google C++ Testing Framework (Google Test) found in /home/yujinkim/cura/build/googletest
-- CURA_TEST_LIST set to: EXECUTION_TEST;EXPLAIN_TEST;EXPRESSION_TEST;KERNEL_TEST;PARSER_TEST
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/yujinkim/cura/CUDF_LIBCUDACXX_INCLUDE_DIR
   used as include directory in directory /home/yujinkim/cura
/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf.so;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB-NOTFOUND;CUDF_LIB
    linked by target "cura" in directory /home/yujinkim/cura

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "cura".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I'm using Ubuntu 20.04 and I built cuDF from source (branch-0.19 targeting CUDA 10.1). I took a look at /cmake/find/cudf.cmake and, in lines 129-150:

set(CUDF_MODULE_LIST
    "cudf"
    "cudf_ast"
    "cudf_base"
    "cudf_comms"
    "cudf_hash"
    "cudf_interop"
    "cudf_io"
    "cudf_join"
    "cudf_merge"
    "cudf_partitioning"
    "cudf_reductions"
    "cudf_replace"
    "cudf_reshape"
    "cudf_rolling"
    "cudf_transpose")

foreach(CUDF_MODULE IN LISTS CUDF_MODULE_LIST)
  find_library(CUDF_LIB NAMES ${CUDF_MODULE} HINTS "${CONDA_PREFIX}/lib")
  list(APPEND CUDF_LIBRARIES "${CUDF_LIB}")
  unset(CUDF_LIB CACHE)
endforeach()

... I found that the corresponding files (e.g. cudf_ast) did not exist in the lib directory mentioned, which only contained libcudf.so.

So, I wonder, what can I do in order to get these libraries to exist?

@zanmato1984
Copy link
Owner

Hi Yujin, glad that you tried cura. And sorry about that our project lacks documentary.

Regarding to your question, a quick way would be that you try using cudf 0.18, which is the version we have been successfully building cura last time. By looking at the cudf history, PR rapidsai/cudf#7107 seems combine multiple libraries together since 0.19, whereas it was once split into multiple since 0.18.

Cudf is in fast pace of development and we haven't caught up to its latest version yet. We'll try to do it but that may take a while. If you have any questions using cura, please tell us and we're happy to help. Thank you.

BTW: it's preferable to enable cudf's ptds build option, this is kind of essential for cura.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

Hi,

Thank you. I've switched to branch-0.18, and could find all the binary libraries, but I still can't find simt/chrono in libcudacxx.

Apparently, libcudacxx 19a20a7219c renamed simt to cuda. So, I will have to try an earlier version. What version of libcudacxx works best?

@zanmato1984
Copy link
Owner

Did you hit any CMake error or it somehow got to the actual compile and the error was thrown by GCC?

If it is the later case, I think libcudacxx is installed during cudf conda env initialization. Have you tried updating the conda env after you switching to cudf 0.18?

@ghost
Copy link
Author

ghost commented Jun 21, 2021

Hi,

It was a CMake error. Here's the output: Pastebin.com.

An abridged version:

yujinkim@istanbul:~/cura/build$ conda activate cudf_dev
(cudf_dev) yujinkim@istanbul:~/cura/build$ cmake .. -DENABLE_CUDF=1
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Enabling the GLIBCXX11 ABI
-- Building CURA targeting GPU
-- Finding RAPIDJSON
-- RapidJSON found. Headers: /home/yujinkim/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/../../include
-- Finding ARROW
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/cudf_dev
-- Using ARROW: /home/yujinkim/miniconda3/envs/cudf_dev/include : /home/yujinkim/miniconda3/envs/cudf_dev/lib/libarrow.so
-- Finding CUDA
-- The CUDA compiler identification is NVIDIA 11.1.74
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- CUDA_VERSION_MAJOR: 11
-- CUDA_VERSION_MINOR: 1
-- CUDA_VERSION: 11.1
GPU_ARCHS = 60;70;75;80
-- Using CUDA: /usr/local/cuda/include : /usr/local/cuda/lib64/stubs/libcuda.so
-- Using CUDART: /usr/local/cuda/lib64/libcudart.so
-- Finding CUDF
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/cudf_dev
-- Using CUDF: /home/yujinkim/miniconda3/envs/cudf_dev/include : /home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_ast.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_base.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_comms.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_hash.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_interop.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_io.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_join.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_merge.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_partitioning.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_reductions.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_replace.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_reshape.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_rolling.so;/home/yujinkim/miniconda3/envs/cudf_dev/lib/libcudf_transpose.so
-- Using LIBCUDACXX: CUDF_LIBCUDACXX_INCLUDE_DIR-NOTFOUND
-- GTEST: Enabling the GLIBCXX11 ABI
...
[100%] Built target GoogleTest
-- GoogleTest installed here: /home/yujinkim/cura/build/googletest/install
-- Google C++ Testing Framework (Google Test) found in /home/yujinkim/cura/build/googletest
-- CURA_TEST_LIST set to: EXECUTION_TEST;EXPLAIN_TEST;EXPRESSION_TEST;KERNEL_TEST;PARSER_TEST
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/yujinkim/cura/CUDF_LIBCUDACXX_INCLUDE_DIR
   used as include directory in directory /home/yujinkim/cura

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "cura".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

My CMake is 3.18.5.


EDIT: I used an unedited version of the CMake scripts.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

If it is the later case, I think libcudacxx is installed during cudf conda env initialization. Have you tried updating the conda env after you switching to cudf 0.18?

I did exit my shell, logged in again, and reactivated the environment.

@zanmato1984
Copy link
Owner

If it is the later case, I think libcudacxx is installed during cudf conda env initialization. Have you tried updating the conda env after you switching to cudf 0.18?

I did exit my shell, logged in again, and reactivated the environment.

  1. Could you list the path of libcudacxx and anything that may indicate its version?
  2. Updating conda env requires a command like conda env update .... Have you done that?

@ghost
Copy link
Author

ghost commented Jun 21, 2021

...

  1. Could you list the path of libcudacxx and anything that may indicate its version?

It's located in /miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda (most in its std/ folder) but I am not sure how to retrieve its version.

  1. Updating conda env requires a command like conda env update .... Have you done that?

I don't know if I'm doing this the right way since I couldn't find an instruction to do this in cudf/CONTRIBUTING.md.

(cudf_dev) yujinkim@istanbul:~/cudf/conda/environments$ conda env update -f cudf_dev_cuda10.1.yml 
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.9.2
  latest version: 4.10.1

Please update conda by running

    $ conda update -n base -c defaults conda


Installing pip dependencies: \ Ran pip subprocess with arguments:
['/home/yujinkim/miniconda3/envs/cudf_dev/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt']
Pip subprocess output:
Collecting git+https://github.com/dask/dask.git@main (from -r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1))
  Cloning https://github.com/dask/dask.git (to revision main) to /tmp/pip-req-build-e4mdmgbq
Collecting git+https://github.com/dask/distributed.git@main (from -r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2))
  Cloning https://github.com/dask/distributed.git (to revision main) to /tmp/pip-req-build-5kgbk9cn
Collecting git+https://github.com/python-streamz/streamz.git (from -r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 3))
  Cloning https://github.com/python-streamz/streamz.git to /tmp/pip-req-build-bkbno9zj
Requirement already satisfied: pyorc in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from -r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 4)) (0.4.0)
Requirement already satisfied: pyyaml in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (5.4.1)
Requirement already satisfied: cloudpickle>=1.1.1 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (1.6.0)
Requirement already satisfied: fsspec>=0.6.0 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (2021.6.0)
Requirement already satisfied: toolz>=0.8.2 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (0.11.1)
Requirement already satisfied: partd>=0.3.10 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (1.2.0)
Requirement already satisfied: click>=6.6 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (8.0.1)
Requirement already satisfied: msgpack>=0.6.0 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (1.0.2)
Requirement already satisfied: psutil>=5.0 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (5.8.0)
Requirement already satisfied: sortedcontainers!=2.0.0,!=2.0.1 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (2.4.0)
Requirement already satisfied: tblib>=1.6.0 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (1.7.0)
Requirement already satisfied: zict>=0.1.3 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (2.0.0)
Requirement already satisfied: setuptools in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (49.6.0.post20210108)
Requirement already satisfied: tornado>=5 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (6.1)
Requirement already satisfied: six in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from streamz==0.6.2->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 3)) (1.16.0)
Requirement already satisfied: importlib-metadata in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from click>=6.6->distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (4.5.0)
Requirement already satisfied: locket in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from partd>=0.3.10->dask==2021.6.1+1.g8aea537d->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 1)) (0.2.0)
Requirement already satisfied: heapdict in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from zict>=0.1.3->distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (1.0.1)
Requirement already satisfied: typing-extensions>=3.6.4 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from importlib-metadata->click>=6.6->distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (3.10.0.0)
Requirement already satisfied: zipp>=0.5 in /home/yujinkim/miniconda3/envs/cudf_dev/lib/python3.7/site-packages (from importlib-metadata->click>=6.6->distributed==2021.6.1+1.gd9bc3c63->-r /home/yujinkim/cudf/conda/environments/condaenv._ud6i1j8.requirements.txt (line 2)) (3.4.1)

done
#
# To activate this environment, use
#
#     $ conda activate cudf_dev
#
# To deactivate an active environment, use
#
#     $ conda deactivate

I don't think there was any change.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

I've found that libcudacxx is part of the CUDA Toolkit. I see that a CUDA Toolkit is installed in my Conda environment:

(cudf_dev) yujinkim@istanbul:~/miniconda3/envs/cudf_dev/include$ conda list | grep cuda
# Name                    Version                   Build  Channel
...
cudatoolkit               10.1.243             h036e899_8    nvidia
...

@zanmato1984
Copy link
Owner

Could you paste the actual path of file chrono under your libcudacxx directory?

We may hit some unexpected condition here. As a quick fix, you can try replace the actual relative path of file chrono in line

find_path(CUDF_LIBCUDACXX_INCLUDE_DIR NAMES simt/chrono HINTS "${CONDA_PREFIX}/include/libcudf/libcudacxx")
.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

The chrono file is located in ~/miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda/std/.

I'll try to change the relative path and, if needed, also change the "name" to cuda/chrono or std/chrono.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

UPDATE: Found libcudacxx!

# find_path(CUDF_LIBCUDACXX_INCLUDE_DIR NAMES simt/chrono HINTS "${CONDA_PREFIX}/include/libcudf/libcudacxx")
find_path(CUDF_LIBCUDACXX_INCLUDE_DIR NAMES chrono HINTS "${CONDA_PREFIX}/include/libcudf/libcudacxx/cuda/std")

The ./cmake/find/cudf.cmake has been modified like above.

@ghost
Copy link
Author

ghost commented Jun 21, 2021

OK, now I'm in the make stage, and I have many errors in the standard library like this:

(cudf_dev) yujinkim@istanbul:~/cura/build$ make
[  1%] Building CXX object CMakeFiles/cura.dir/src/c/api.cpp.o
In file included from /usr/local/cuda/include/cuda_runtime_api.h:144,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/rmm/detail/error.hpp:21,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/rmm/cuda_stream_view.hpp:19,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/rmm/device_buffer.hpp:18,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/cudf/null_mask.hpp:20,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/cudf/column/column.hpp:20,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/cudf/table/table.hpp:18,
                 from /home/yujinkim/cura/include/cura/data/fragment.h:8,
                 from /home/yujinkim/cura/src/c/api.cpp:4:
/usr/local/cuda/include/crt/host_defines.h:86: error: "__forceinline__" redefined [-Werror]
   86 | #define __forceinline__ \
      | 
In file included from /home/yujinkim/miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda/std/version:13,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda/std/cstddef:20,
                 from /home/yujinkim/miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda/std/type_traits:17,
                 from /usr/include/c++/9/bits/move.h:55,
                 from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/stdexcept:38,
                 from /home/yujinkim/cura/include/cura/common/errors.h:3,
                 from /home/yujinkim/cura/src/c/api.cpp:2:
/home/yujinkim/miniconda3/envs/cudf_dev/include/libcudf/libcudacxx/cuda/std/detail/__config:30: note: this is the location of the previous definition
   30 |         #define __forceinline__
      | 
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/stdexcept:38,
                 from /home/yujinkim/cura/include/cura/common/errors.h:3,
                 from /home/yujinkim/cura/src/c/api.cpp:2:
/usr/include/c++/9/bits/move.h:74:27: error: ‘remove_reference’ in namespace ‘std’ does not name a template type
   74 |     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
      |                           ^~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/move.h:74:43: error: expected ‘,’ or ‘...’ before ‘<’ token
   74 |     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
      |                                           ^
/usr/include/c++/9/bits/move.h: In function ‘constexpr _Tp&& std::forward(int)’:
/usr/include/c++/9/bits/move.h:75:33: error: ‘__t’ was not declared in this scope; did you mean ‘__1’?
   75 |     { return static_cast<_Tp&&>(__t); }
      |                                 ^~~
      |                                 __1
/usr/include/c++/9/bits/move.h: At global scope:
/usr/include/c++/9/bits/move.h:85:27: error: ‘remove_reference’ in namespace ‘std’ does not name a template type
   85 |     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
      |                           ^~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/move.h:85:43: error: expected ‘,’ or ‘...’ before ‘<’ token
   85 |     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
      |                                           ^
/usr/include/c++/9/bits/move.h:85:5: error: redefinition of ‘template<class _Tp> constexpr _Tp&& std::forward(int)’
   85 |     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
      |     ^~~~~~~
/usr/include/c++/9/bits/move.h:74:5: note: ‘template<class _Tp> constexpr _Tp&& std::forward(int)’ previously declared here
   74 |     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
      |     ^~~~~~~
/usr/include/c++/9/bits/move.h:98:29: error: ‘remove_reference’ in namespace ‘std’ does not name a template type
   98 |     constexpr typename std::remove_reference<_Tp>::type&&
      |                             ^~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/move.h:98:45: error: expected unqualified-id before ‘<’ token
   98 |     constexpr typename std::remove_reference<_Tp>::type&&
      |                                             ^
/usr/include/c++/9/bits/move.h:105:20: error: expected template-name before ‘<’ token
  105 |     : public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
      |                    ^
/usr/include/c++/9/bits/move.h:105:20: error: expected ‘{’ before ‘<’ token
/usr/include/c++/9/bits/move.h:118:5: error: expected nested-name-specifier before ‘conditional’
  118 |     conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type
      |     ^~~~~~~~~~~
/usr/include/c++/9/bits/move.h:118:16: error: expected initializer before ‘<’ token
  118 |     conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type
      |                ^
/usr/include/c++/9/bits/move.h: In function ‘_Tp std::__exchange(_Tp&, _Up&&)’:
/usr/include/c++/9/bits/move.h:151:28: error: ‘move’ is not a member of ‘std’
  151 |       _Tp __old_val = std::move(__obj);
      |                            ^~~~
/usr/include/c++/9/bits/move.h:56:1: note: ‘std::move’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
   55 | #include <type_traits> // Brings in std::declval too.
  +++ |+#include <utility>
   56 | 
/usr/include/c++/9/bits/move.h: At global scope:
/usr/include/c++/9/bits/move.h:179:14: error: expected nested-name-specifier before ‘enable_if’
  179 |     typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
      |              ^~~~~~~~~
/usr/include/c++/9/bits/move.h:179:23: error: expected initializer before ‘<’ token
  179 |     typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
      |                       ^
...
^Cmake[2]: *** [CMakeFiles/cura.dir/build.make:82: CMakeFiles/cura.dir/src/c/api.cpp.o] Interrupt
make[1]: *** [CMakeFiles/Makefile2:396: CMakeFiles/cura.dir/all] Interrupt
make: *** [Makefile:114: all] Interrupt

I think I have something misconfigured.

@zanmato1984
Copy link
Owner

This error seems unfamiliar to me. As you mentioned it might be some fundamental configuration issue. One thing you can look at is if the compiler to build cura is the same as the one you built cudf. As far as I recall there are some limitation of GCC version when compiling cuda projects.

@zanmato1984
Copy link
Owner

By looking at the information you supplied before, I found something suspicious:

Your local installation of CUDA is 11.1:

-- The CUDA compiler identification is NVIDIA 11.1.74
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped

However you were using a conda env targeting CUDA 10.1:

(cudf_dev) yujinkim@istanbul:~/cudf/conda/environments$ conda env update -f cudf_dev_cuda10.1.yml 

It might not be the reason of the error, but it worth a shot to try updating conda env to 11.0 (yes, cudf 0.18 doesn't have a 11.1 conda env but 11.0 would do too).

@ghost
Copy link
Author

ghost commented Jun 22, 2021

I'm suspecting the same thing. Unfortunately, I am not the owner of the computer I'm using, and my colleagues are using CUDA 10.1 toolkits so I need to use the same working versions. However, I also got ahold of my own computer with an NVIDIA GPU, so I will try that setup there with the matching versions of CUDA installation/tookits. Thanks for the extended support and I'll get back to you tomorrow (Pacific Time).

@zanmato1984
Copy link
Owner

OK, hope things go well on your own machine. Come back anytime.

@ghost
Copy link
Author

ghost commented Jun 24, 2021

I've set up my own computer (Windows and WSL2 Ubuntu 20.04) which does recognize and run CUDA on my GPU from the Linux side.

So far I was able to configure the build like so:

(rapids-0.18) $ pwd
/home/yujinkim/cura/build
(rapids-0.18) $ CC=clang CXX=clang++ cmake .. -DENABLE_CUDF=1
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building CURA targeting GPU
-- Finding RAPIDJSON
-- RapidJSON found. Headers: /home/yujinkim/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/../../include
-- Finding ARROW
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/rapids-0.18
-- Using ARROW: /home/yujinkim/miniconda3/envs/rapids-0.18/include : /home/yujinkim/miniconda3/envs/rapids-0.18/lib/libarrow.so
-- Finding CUDA
-- The CUDA compiler identification is NVIDIA 11.0.221
-- Check for working CUDA compiler: /usr/local/cuda-11.0/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-11.0/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- CUDA_VERSION_MAJOR: 11
-- CUDA_VERSION_MINOR: 0
-- CUDA_VERSION: 11.0
GPU_ARCHS = 60;70;75;80
-- Using CUDA: /usr/local/cuda/include : /usr/local/cuda/lib64/stubs/libcuda.so
-- Using CUDART: /usr/local/cuda/lib64/libcudart.so
-- Finding CUDF
-- Using CONDA_PREFIX: /home/yujinkim/miniconda3/envs/rapids-0.18
-- Using CUDF: /home/yujinkim/miniconda3/envs/rapids-0.18/include : /home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_ast.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_base.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_comms.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_hash.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_interop.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_io.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_join.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_merge.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_partitioning.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_reductions.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_replace.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_reshape.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_rolling.so;/home/yujinkim/miniconda3/envs/rapids-0.18/lib/libcudf_transpose.so
-- Using LIBCUDACXX: /home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda
-- GTEST: Disabling the GLIBCXX11 ABI
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yujinkim/cura/build/googletest
-- GTEST BUILD: Enabling Parallel CMake build with all threads
...
[100%] Completed 'GoogleTest'
[100%] Built target GoogleTest
-- GoogleTest installed here: /home/yujinkim/cura/build/googletest/install
-- Google C++ Testing Framework (Google Test) found in /home/yujinkim/cura/build/googletest
-- CURA_TEST_LIST set to: EXECUTION_TEST;EXPLAIN_TEST;EXPRESSION_TEST;KERNEL_TEST;PARSER_TEST
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yujinkim/cura/build
(rapids-0.18) $

In summary, I'm using

  • Clang 10.0,
  • CUDA 10.1, and
  • cuDF 0.18.

Now in the build stage, I'm getting an error but it's something different. See:

(rapids-0.18) $ make
Scanning dependencies of target cura
[  1%] Building CXX object CMakeFiles/cura.dir/src/c/api.cpp.o
In file included from /home/yujinkim/cura/src/c/api.cpp:4:
In file included from /home/yujinkim/cura/include/cura/data/fragment.h:3:
In file included from /home/yujinkim/cura/include/cura/expression/expressions.h:4:
In file included from /home/yujinkim/cura/include/cura/data/column.h:3:
In file included from /home/yujinkim/cura/include/cura/type/data_type.h:5:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:26:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/data.h:236:32: error: implicit instantiation of undefined template 'std::atomic<long>'
  mutable std::atomic<int64_t> null_count;
                               ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/atomic_base.h:145:12: note: template is declared here
    struct atomic;
           ^
In file included from /home/yujinkim/cura/src/c/api.cpp:4:
In file included from /home/yujinkim/cura/include/cura/data/fragment.h:3:
In file included from /home/yujinkim/cura/include/cura/expression/expressions.h:4:
In file included from /home/yujinkim/cura/include/cura/data/column.h:3:
In file included from /home/yujinkim/cura/include/cura/type/data_type.h:5:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:31:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:68:37: error: implicit instantiation of undefined template 'std::atomic<std::__cxx11::basic_string<char> *>'
  mutable std::atomic<std::string*> fingerprint_;
                                    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/atomic_base.h:148:12: note: template is declared here
    struct atomic<_Tp*>;
           ^
In file included from /home/yujinkim/cura/src/c/api.cpp:4:
In file included from /home/yujinkim/cura/include/cura/data/fragment.h:3:
In file included from /home/yujinkim/cura/include/cura/expression/expressions.h:4:
In file included from /home/yujinkim/cura/include/cura/data/column.h:3:
In file included from /home/yujinkim/cura/include/cura/type/data_type.h:5:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:31:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:69:37: error: implicit instantiation of undefined template 'std::atomic<std::__cxx11::basic_string<char> *>'
  mutable std::atomic<std::string*> metadata_fingerprint_;
                                    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/atomic_base.h:148:12: note: template is declared here
    struct atomic<_Tp*>;
           ^
In file included from /home/yujinkim/cura/src/c/api.cpp:4:
In file included from /home/yujinkim/cura/include/cura/data/fragment.h:3:
In file included from /home/yujinkim/cura/include/cura/expression/expressions.h:4:
In file included from /home/yujinkim/cura/include/cura/data/column.h:3:
In file included from /home/yujinkim/cura/include/cura/type/data_type.h:5:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25:
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:31:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:415:25: error: only virtual member functions can be marked 'final'
  int bit_width() const final { return 1; }
                        ^~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:417:33: error: only virtual member functions can be marked 'override'
  DataTypeLayout layout() const override {
                                ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:422:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:427:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::UInt8Type, arrow::Type::UINT8, unsigned char>' requested here
    : public detail::IntegerTypeImpl<UInt8Type, Type::UINT8, uint8_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:432:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:437:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::Int8Type, arrow::Type::INT8, signed char>' requested here
    : public detail::IntegerTypeImpl<Int8Type, Type::INT8, int8_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:442:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:447:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::UInt16Type, arrow::Type::UINT16, unsigned short>' requested here
    : public detail::IntegerTypeImpl<UInt16Type, Type::UINT16, uint16_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:452:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:457:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::Int16Type, arrow::Type::INT16, short>' requested here
    : public detail::IntegerTypeImpl<Int16Type, Type::INT16, int16_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:462:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:467:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::UInt32Type, arrow::Type::UINT32, unsigned int>' requested here
    : public detail::IntegerTypeImpl<UInt32Type, Type::UINT32, uint32_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:472:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:477:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::Int32Type, arrow::Type::INT32, int>' requested here
    : public detail::IntegerTypeImpl<Int32Type, Type::INT32, int32_t> {
             ^
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:482:42: error: only virtual member functions can be marked 'override'
  std::string ComputeFingerprint() const override;
                                         ^~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:382:26: error: only virtual member functions can be marked 'override'
  bool is_signed() const override { return std::is_signed<C_TYPE>::value; }
                         ^~~~~~~~~
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/type.h:487:14: note: in instantiation of template class 'arrow::detail::IntegerTypeImpl<arrow::UInt64Type, arrow::Type::UINT64, unsigned long>' requested here
    : public detail::IntegerTypeImpl<UInt64Type, Type::UINT64, uint64_t> {
             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/cura.dir/build.make:63: CMakeFiles/cura.dir/src/c/api.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:674: CMakeFiles/cura.dir/all] Error 2
make: *** [Makefile:95: all] Error 2
(rapids-0.18) $

The reporting is that there is a problem with Arrow.

I built the same package with GCC/G++ 9.3.0 as well. Now my error looks like this:

Scanning dependencies of target cura
[  1%] Building CXX object CMakeFiles/cura.dir/src/c/api.cpp.o
In file included from /usr/local/cuda/include/cuda_runtime_api.h:138,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/rmm/detail/error.hpp:21,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/rmm/cuda_stream_view.hpp:19,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/rmm/device_buffer.hpp:18,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/cudf/null_mask.hpp:20,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/cudf/column/column.hpp:20,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/cudf/table/table.hpp:18,
                 from /home/yujinkim/cura/include/cura/data/fragment.h:8,
                 from /home/yujinkim/cura/src/c/api.cpp:4:
/usr/local/cuda/include/crt/host_defines.h:86: error: "__forceinline__" redefined [-Werror]
   86 | #define __forceinline__ \
      |
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda/std/version:13,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda/std/cstddef:20,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda/std/atomic:40,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda/atomic:10,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/data.h:20,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:26,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22,
                 from /home/yujinkim/cura/include/cura/type/data_type.h:5,
                 from /home/yujinkim/cura/include/cura/data/column.h:3,
                 from /home/yujinkim/cura/include/cura/expression/expressions.h:4,
                 from /home/yujinkim/cura/include/cura/data/fragment.h:3,
                 from /home/yujinkim/cura/src/c/api.cpp:4:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda/std/detail/__config:30: note: this is the location of the previous definition
   30 |         #define __forceinline__
      |
In file included from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/array_base.h:26,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array.h:25,
                 from /home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/api.h:22,
                 from /home/yujinkim/cura/include/cura/type/data_type.h:5,
                 from /home/yujinkim/cura/include/cura/data/column.h:3,
                 from /home/yujinkim/cura/include/cura/expression/expressions.h:4,
                 from /home/yujinkim/cura/include/cura/data/fragment.h:3,
                 from /home/yujinkim/cura/src/c/api.cpp:4:
/home/yujinkim/miniconda3/envs/rapids-0.18/include/arrow/array/data.h:236:32: error: field ‘null_count’ has incomplete type ‘std::atomic<long int>’
  236 |   mutable std::atomic<int64_t> null_count;
...
^Cmake[2]: *** [CMakeFiles/cura.dir/build.make:63: CMakeFiles/cura.dir/src/c/api.cpp.o] Interrupt
make[1]: *** [CMakeFiles/Makefile2:674: CMakeFiles/cura.dir/all] Interrupt
make: *** [Makefile:95: all] Interrupt

(rapids-0.18) $

I think that ultimately the problem has something to do with the downloaded Arrow library (Clang is clearer here in the error messages).

Do you think if I messed with the CMake script that finds Arrow, that this problem may be solved?

@zanmato1984
Copy link
Owner

zanmato1984 commented Jun 24, 2021

I may need several inputs:

  1. You mentioned you were using CUDA 10.1, but I saw CMake told it was actually 11.0.
  2. Did you build your own cudf?
  3. What compiler you were using to build your own cudf?
  4. Could you try to build cura targeting CPU by setting ENABLE_CUDF=OFF? This would double check if your arrow is problematic.

@zanmato1984
Copy link
Owner

zanmato1984 commented Jun 24, 2021

One more thing. I may have mis-configured CUDA toolkit root directory in CMake.

You can try replacing /usr/local/cuda in this line

set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda")

with the one under your conda env directory, i.e. /home/yujinkim/miniconda3/envs/rapids-0.18/.../cuda.

This should effectively make compiler see exactly the same cuda include/lib as you build cudf. And at least clear some noise for the real question we are dealing with.

@ghost
Copy link
Author

ghost commented Jun 24, 2021

I may need several inputs:

  1. You mentioned you were using CUDA 10.1, but I saw CMake told it was actually 11.0.
  2. Did you build your own cudf?
  3. What compiler you were using to build your own cudf?
  4. Could you try to build cura targeting CPU by setting ENABLE_CUDF=OFF? This would double check if your arrow is problematic.
  1. This is my own computer, so I wanted to use the right CUDA version. So, yes, I did use CUDA 11.0 (only for this computer).
  2. No, it takes some time to build cuDF so I decided to use the one provided from Conda.
  3. (N/A)
  4. I am having an odd kind of error during the CMake configuration process (with Arrow):
(rapids-0.18) $ CC=clang CXX=clang++ cmake .. -DENABLE_CUDF=0
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:40 (message):
  Building CURA targeting CPU, this mode is only for purposes of demo and
  study on non-CUDA devices, thus some features may be unimplemented or
  definitely suboptimal


-- Finding RAPIDJSON
-- RapidJSON found. Headers: /home/yujinkim/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/../../include
-- Building ARROW
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yujinkim/cura/build/arrow
-- ARROW BUILD: Enabling Parallel CMake build with all threads
Scanning dependencies of target Arrow
[ 12%] Creating directories for 'Arrow'
[ 25%] Performing download step (git clone) for 'Arrow'
Cloning into 'arrow'...
Note: switching to 'apache-arrow-1.0.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 886d87bde [maven-release-plugin] prepare release apache-arrow-1.0.1
Submodule 'cpp/submodules/parquet-testing' (https://github.com/apache/parquet-testing.git) registered for path 'cpp/submodules/parquet-testing'
Submodule 'testing' (https://github.com/apache/arrow-testing) registered for path 'testing'
Cloning into '/home/yujinkim/cura/build/arrow/arrow/cpp/submodules/parquet-testing'...
Cloning into '/home/yujinkim/cura/build/arrow/arrow/testing'...
Submodule path 'cpp/submodules/parquet-testing': checked out '46c9e977f58f6c5ef1b81f782f3746b3656e5a8c'
Submodule path 'testing': checked out '535369d600a58cbfe6d952777187561b4dacfcbd'
[ 37%] No patch step for 'Arrow'
[ 50%] Performing update step for 'Arrow'
[ 62%] Performing configure step for 'Arrow'
-- Building using CMake version: 3.16.3
CMake Error at CMakeLists.txt:65 (string):
  string no output variable specified


CMake Error at CMakeLists.txt:66 (string):
  string no output variable specified


-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Arrow version: 1.0.1 (full: '1.0.1')
-- Arrow SO version: 100 (full: 100.1.0)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- clang-tidy not found
-- clang-format not found
-- Could NOT find ClangTools (missing: CLANG_FORMAT_BIN CLANG_TIDY_BIN)
-- infer not found
-- Found Python3: /home/yujinkim/miniconda3/envs/rapids-0.18/bin/python3.8 (found version "3.8.10") found components: Interpreter
-- Found cpplint executable at /home/yujinkim/cura/build/arrow/arrow/cpp/build-support/cpplint.py
-- System processor: x86_64
-- Performing Test CXX_SUPPORTS_SSE4_2
-- Performing Test CXX_SUPPORTS_SSE4_2 - Success
-- Performing Test CXX_SUPPORTS_AVX2
-- Performing Test CXX_SUPPORTS_AVX2 - Success
-- Performing Test CXX_SUPPORTS_AVX512
-- Performing Test CXX_SUPPORTS_AVX512 - Success
CMake Error at cmake_modules/SetupCxxFlags.cmake:101 (string):
  string no output variable specified
Call Stack (most recent call first):
  CMakeLists.txt:425 (include)


-- Arrow build warning level: CHECKIN
Using ld linker
Configured for  build (set with cmake -DCMAKE_BUILD_TYPE={release,debug,...})
CMake Error at cmake_modules/SetupCxxFlags.cmake:533 (message):
  Unknown build type:
Call Stack (most recent call first):
  CMakeLists.txt:425 (include)


-- Configuring incomplete, errors occurred!
See also "/home/yujinkim/cura/build/arrow/build/CMakeFiles/CMakeOutput.log".
make[2]: *** [CMakeFiles/Arrow.dir/build.make:107: Arrow-prefix/src/Arrow-stamp/Arrow-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/Arrow.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
CMake Error at cmake/Modules/ConfigureArrow.cmake:51 (message):
  Building Arrow failed: 2
Call Stack (most recent call first):
  cmake/find/arrow.cmake:19 (include)
  CMakeLists.txt:47 (include)


-- Configuring incomplete, errors occurred!
See also "/home/yujinkim/cura/build/CMakeFiles/CMakeOutput.log".
(rapids-0.18) $

The error is the same when using GCC/G++.

@ghost
Copy link
Author

ghost commented Jun 24, 2021

One more thing. I may have mis-configured CUDA toolkit root directory in CMake.

You can try replacing /usr/local/cuda in this line

set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda")

with the one under your conda env directory, i.e. /home/yujinkim/miniconda3/envs/rapids-0.18/.../cuda.
This should effectively make compiler see exactly the same cuda include/lib as you build cudf. And at least clear some noise for the real question we are dealing with.

Well, I can't quite find the folder in my Conda environment:

(rapids-0.18) $ ls /usr/local/cuda
EULA.txt   bin  extras   lib64    nsightee_plugins  nvvm     share  targets  version.txt
Sanitizer  doc  include  libnvvp  nvml              samples  src    tools

(rapids-0.18) $ find ~/miniconda3/envs/rapids-0.18/ -name cuda | xargs ls
/home/yujinkim/miniconda3/envs/rapids-0.18/include/boost/fiber/cuda:
waitfor.hpp

/home/yujinkim/miniconda3/envs/rapids-0.18/include/libcudf/libcudacxx/cuda:
atomic  barrier  latch  semaphore  std

/home/yujinkim/miniconda3/envs/rapids-0.18/lib/python3.8/site-packages/cupy/cuda:
__init__.py                              memory.cpython-38-x86_64-linux-gnu.so
__pycache__                              memory_hook.cpython-38-x86_64-linux-gnu.so
common.cpython-38-x86_64-linux-gnu.so    memory_hooks
compiler.py                              nccl.cpython-38-x86_64-linux-gnu.so
cub.cpython-38-x86_64-linux-gnu.so       nvtx.cpython-38-x86_64-linux-gnu.so
cudnn.py                                 pinned_memory.cpython-38-x86_64-linux-gnu.so
cufft.cpython-38-x86_64-linux-gnu.so     profiler.py
cupy_cub.cu                              runtime.py
cupy_thrust.cu                           stream.cpython-38-x86_64-linux-gnu.so
device.cpython-38-x86_64-linux-gnu.so    texture.cpython-38-x86_64-linux-gnu.so
function.cpython-38-x86_64-linux-gnu.so  thrust.cpython-38-x86_64-linux-gnu.so

/home/yujinkim/miniconda3/envs/rapids-0.18/lib/python3.8/site-packages/cupy_backends/cuda:
__init__.py  __pycache__  api  libs  stream.cpython-38-x86_64-linux-gnu.so

/home/yujinkim/miniconda3/envs/rapids-0.18/lib/python3.8/site-packages/numba/cuda:
__init__.py  cuda_paths.py  descriptor.py   intrinsic_wrapper.py  mathimpl.py   simulator_init.py  vectorizers.py
__pycache__  cudadecl.py    device_init.py  kernels               models.py     stubs.py
api.py       cudadrv        dispatcher.py   libdevice.py          nvvmutils.py  target.py
args.py      cudaimpl.py    envvars.py      libdevicedecl.py      printimpl.py  testing.py
codegen.py   cudamath.py    errors.py       libdevicefuncs.py     random.py     tests
compiler.py  decorators.py  initialize.py   libdeviceimpl.py      simulator     types.py

I might be misunderstanding something. Let me read more about CUDA/cuDF and then come back.

@zanmato1984
Copy link
Owner

Hi @csm-yujinkim , I've added some simple conda support for building cura. You can now try pulling the latest change and building with the following command:

conda env create --name cura-dev --file ./conda/environments/cura_dev.yml
conda activate cura-dev
mkdir build
cd build
cmake .. -DENABLE_CUDF=ON
make -j

Let me know if this works for you.

PS: I made a mistake about the cudf version that cura depends on. It should be 0.17 rather than 0.18 and my apologies for all the mess that this misleading caused. I was recently able to get my desktop back to work (my card was borrowed before) so I took some deeper look and sorted things out. Sorry about that.

@ghost
Copy link
Author

ghost commented Jul 1, 2021

OK, it's building now, and tests pass as well.

I had to revert the script to find LIBCUDACXX, however:

diff --git a/cmake/find/cudf.cmake b/cmake/find/cudf.cmake
index a249744..9b7915d 100644
--- a/cmake/find/cudf.cmake
+++ b/cmake/find/cudf.cmake
@@ -150,7 +150,7 @@ foreach(CUDF_MODULE IN LISTS CUDF_MODULE_LIST)
 endforeach()

 find_path(CUDF_INCLUDE_DIR NAMES cudf HINTS "${CONDA_PREFIX}/include")
-find_path(CUDF_LIBCUDACXX_INCLUDE_DIR NAMES std/chrono HINTS "${CONDA_PREFIX}/include/libcudf/libcudacxx/cuda")
+find_path(CUDF_LIBCUDACXX_INCLUDE_DIR NAMES simt/chrono HINTS "${CONDA_PREFIX}/include/libcudf/libcudacxx")

 message(STATUS "Using CUDF: ${CUDF_INCLUDE_DIR} : ${CUDF_LIBRARIES}")
 message(STATUS "Using LIBCUDACXX: ${CUDF_LIBCUDACXX_INCLUDE_DIR}")

@ghost
Copy link
Author

ghost commented Jul 1, 2021

Thank you very much!

@ghost ghost closed this as completed Jul 1, 2021
@zanmato1984
Copy link
Owner

Thank you very much!

You are welcome. Let me know if you have any questions using cura.

This issue was closed.
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

No branches or pull requests

1 participant