NVlabs / nvbio

NVBIO is a library of reusable components designed to accelerate bioinformatics applications using CUDA.
BSD 3-Clause "New" or "Revised" License
206 stars 50 forks source link

how to define THRUST_IGNORE_CUB_VERSION_CHECK for nvbio compilation #41

Closed FTouzain closed 3 years ago

FTouzain commented 3 years ago

Hello and thank you for nvbio implementation,

I wanted to compile nvbio on cuda 11.3 and ubuntu 20.04 (and nvidia T4 graphic card). Here is the error I obtained:

/usr/local/cuda-11.3/include/thrust/system/cuda/config.h:78:2: error: #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.

So, I understand I must define THRUST_IGNORE_CUB_VERSION_CHECK to success in compilation but where and how to do this, please?

I tried to define it as an environment variable in my .bashrc

export THRUST_IGNORE_CUB_VERSION_CHECK=true

then (in build directory)

source ~/.bashrc
cmake .. -DGPU_ARCHITECTURE=sm_75
make -e j8

The last command provided the error again.

May you help me please?

FTouzain commented 3 years ago

I found. After

cmake .. -DGPU_ARCHITECTURE=sm_75

You must edit the file

../CMakeLists.txt

and add in it

add_compile_definitions(THRUST_IGNORE_CUB_VERSION_CHECK)

After that

make -e j8

do not show errors