The Wayback Machine - https://web.archive.org/web/20220404161825/https://github.com/arrayfire/arrayfire/issues/3067
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

Building ArrayFire 3.6.4 with CUDA 11.0 ? #3067

Open
mboisson opened this issue Dec 17, 2020 · 11 comments
Open

Building ArrayFire 3.6.4 with CUDA 11.0 ? #3067

mboisson opened this issue Dec 17, 2020 · 11 comments
Assignees

Comments

@mboisson
Copy link

@mboisson mboisson commented Dec 17, 2020

I am getting the following when building ArrayFire 3.6.4 :

cd /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj/src/api/unified && /tmp/eb-cwbxd1fp/tmp5h0wmk6b/icpc  -DAFDLL -DAF_WITH_LOGGING -DOS_LNX -Daf_EXPORTS -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/include -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj/include -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-  2020a/arrayfire-full-3.6.4/src/api/c -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/src/backend -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/src/backend/common/SYSTEM -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/extern/     forge/include -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj/extern/forge/include -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/extern/spdlog/include -I/tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/extern/glad/include -isystem /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.  217/mkl/include -isystem /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include/fftw  -O2 -march=core-avx2 -axCore-AVX512 -ftz -fp-speculation=safe -fp-model source -O3 -DNDEBUG -fPIC -fvisibility=hidden   -std=c++11 -o CMakeFiles/af.dir/array.cpp.o -c /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/src/api/   unified/array.cpp
In file included from /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/cudacore/11.0.2/include/thrust/system/cuda/detail/execution_policy.h(33),
                 from /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/cudacore/11.0.2/include/thrust/system/cuda/detail/par.h(31),
                 from /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/src/backend/cuda/debug_cuda.hpp(13),
                 from /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/src/backend/cuda/kernel/thrust_sort_by_key_impl.hpp(10),
                 from /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj/src/backend/cuda/kernel/thrust_sort_by_key/thrust_sort_by_key_impl_float_1.cu(10):
/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/cudacore/11.0.2/include/thrust/system/cuda/config.h(78): error: #error directive: The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK   to ignore this.
  #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
   ^

CMake Error at cuda_compile_6_generated_thrust_sort_by_key_impl_float_1.cu.o.Release.cmake:220 (message):
  Error generating
  /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/easybuild_obj/src/backend/cuda/CMakeFiles/cuda_compile_6.dir/kernel/thrust_sort_by_key/./cuda_compile_6_generated_thrust_sort_by_key_impl_float_1.cu.o

Here is my cmake command :

cmake -DCMAKE_INSTALL_PREFIX=/home/mboisson/.local/easybuild/software/2020/avx2/CUDA/intel2020/cuda11.0/arrayfire/3.6.4 -DCMAKE_C_COMPILER='icc' -DCMAKE_C_FLAGS='-O2 -march=core-avx2 -axCore-AVX512 -ftz -fp-speculation=safe -fp-model source' -DCMAKE_CXX_COMPILER='icpc' -DCMAKE_CXX_FLAGS='-O2 -march=core-avx2 -axCore-AVX512 -ftz -fp-speculation=safe -fp-model source' -DCMAKE_Fortran_COMPILER='ifort' -DCMAKE_Fortran_FLAGS='-O2 -march=core-avx2 -axCore-AVX512 -ftz -fp-speculation=safe -fp-model source' -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_ROOT=/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Compiler/intel2020/boost/1.72.0 -DBoost_NO_SYSTEM_PATHS=ON -DBoost_NO_BOOST_CMAKE=ON  -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=Release -DUSE_CPU_MKL:BOOL=ON -DUSE_OPENCL_MKL:BOOL=ON -DMKL_THREAD_LAYER='Intel OpenMP' -DBUILD_TESTING=OFF  -DOpenCL_LIBRARY=$CUDA_HOME/lib64/libOpenCL.so -DCUDA_architecture_build_targets="3.5;3.7;5.0;5.2;5.3;6.0;6.1;6.2;7.0;8.0"  /tmp/mboisson/avx2/ArrayFire/3.6.4/iimklc-2020a/arrayfire-full-3.6.4/

Is there any option to tell it to skip its own internal version ? Or this version of ArrayFire is simply not compatible with that version of Cuda ?

@mboisson mboisson added the build label Dec 17, 2020
@9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 17, 2020

@mboisson This problem has been already addressed in v3.7.3 fix release already. You can try to patch the changes from this commit - eb79d77 - to your local clone and try building.

I would recommend checking out newer release version since you are building anyway which is v3.7.3

@9prady9 9prady9 added duplicate and removed build labels Dec 17, 2020
@mboisson
Copy link
Author

@mboisson mboisson commented Dec 17, 2020

Thanks. I can't use 3.7.3, since I want to use ArrayFire python and there isn't a release of that for 3.7.

@mboisson
Copy link
Author

@mboisson mboisson commented Dec 17, 2020

Mmm, the patch fails to apply in sparse_arith.cu :/

@9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 17, 2020

@mboisson try adding only changes in src/backend/cuda/CMakeLists.txt

@mboisson
Copy link
Author

@mboisson mboisson commented Dec 17, 2020

Mmm, even the patch to that fails to apply... I'll have to write my own corresponding patch I guess

@9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 17, 2020

@mboisson That shouldn't be hard I think. You would need to do only the following two changes:

  • Remove CUB folder header from cuda_include_directories command i.e. ${CMAKE_CURRENT_SOURCE_DIR}/cub
  • Add the below conditional
if(CUDA_VERSION_MAJOR VERSION_LESS 11)
  cuda_include_directories(${ArrayFire_SOURCE_DIR}/extern/cub)
endif()

@mboisson
Copy link
Author

@mboisson mboisson commented Dec 17, 2020

Ok. I've made the patch. I launched the build again. I'll report back.

@mboisson
Copy link
Author

@mboisson mboisson commented Dec 17, 2020

Yeah, that only helps with the configure step. It then crashes while building. Thurst that comes with CUDA 11 requires C++14, and there are parts of the code base that don't compile with --std=c++14...

I guess this is a dead end.

I have a user who has been waiting since August to get a version of arrayfire python that works. Is this something that will be supported with 3.7 or 3.8 any time soon ?

@9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 18, 2020

@mboisson Starting with v3.7 we moved to C++14 in our internal code base. Hence, the error you are seeing with v3.6.4 I guess.

Ah I get your concern now, the python wrapper for ArrayFire's 3.7 hasn't been released so far. We are extremely sorry about that. Let me see what we can do in next few days. I shall update you here again.

Note: We are already did the release candidate for v3.8 and very soon we will do final v3.8 and respective python and rust wrappers.

@9prady9
Copy link
Member

@9prady9 9prady9 commented Feb 25, 2021

@mboisson Sorry, I forgot to post an update for you here. 3.8(installers come with CUDA 11 runtime) stable release for ArrayFire has been out for a few days now. You can still theoretically use 3.6.4 python wrapper with 3.8 ArrayFire installation as we maintain proper semver compatibility. I shall post another update in the next few days once we have python wrapper 3.8 ready that exposes the new functions from 3.8 release.

@mboisson
Copy link
Author

@mboisson mboisson commented Feb 25, 2021

Thanks for letting me know. I will wait until the new wrappers are out. For the time being, I installed 3.7 with the 3.6 wrappers and our user is happy with that.

@9prady9 9prady9 self-assigned this May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants