ugeneunipro / ugene

UGENE is free open-source cross-platform bioinformatics software
http://ugene.net
GNU General Public License v2.0
213 stars 62 forks source link

Error on make: 'cuda_runtime.h: No such file or directory' #49

Closed lanqiugit closed 4 years ago

lanqiugit commented 5 years ago

Hello, I am trying to build Ugene from source, because I want it to work with Cuda.

The error is as follows.

src/SWAlgorithmTask.cpp:23:26: fatal error: cuda_runtime.h: No such file or directory

include

compilation terminated. src/sw_cuda_cpp.cpp:24:26: fatal error: cuda_runtime.h:

include

compilation terminated. Makefile.Release:3468: recipe for target '_tmp/obj/release/SWAlgorithmTask.o' failed make[2]: [_tmp/obj/release/SWAlgorithmTask.o] Error 1 Makefile.Release:4087: recipe for target '_tmp/obj/release/sw_cuda_cpp.o' failed make[2]: waiting for job completed make[2]: [_tmp/obj/release/sw_cuda_cpp.o] Error 1 make[2]: enterin directory '/home/.../ugene/src/plugins/smith_waterman' Makefile:42: recipe for target 'release' failed make[1]: [release] Error 2 make[1]: entering directory '/home/.../ugene/src/plugins/smith_waterman' Makefile:3621: recipe for target 'sub-src-plugins-smith_waterman-release_ordered' failed make: *** [sub-src-plugins-smith_waterman-release_ordered] Error 2

I did

  1. installation paths may be set up in ugene_globals.pri
  2. qmake -r CONFIG+=x64
  3. make -j 4 release

I already checked this http://ugene.net/forum/YaBB.pl?num=1528031285/3, but I can't build Ugene. Why can't I build Ugene?

Environment: Ubuntu 18.04 RTX 2080 NVIDIA Version 418.87.00 CUDA Version 10.1 Qt 5.13.1

ichebyki commented 5 years ago

Hi, @lanqiugit ! Thank you for your interest in UGENE

Did you setup the following envvars?

CUDA_LIB_PATH
CUDA_INC_PATH

On my Ubuntu 18.04 I set them to the following values:

CUDA_INC_PATH=/usr/local/cuda/include
CUDA_LIB_PATH=/usr/local/cuda/lib

You can check these vars by the env command:

$ env | grep CUDA

My CUDA version:

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88
$ which nvcc
/usr/local/cuda/bin/nvcc

Best regards, --Igor

lanqiugit commented 5 years ago

Thanks for reply! @ichebyki Sorry, I didn't do that.

After I did as follows, another 2 errors happened.

  1. export CUDA_INC_PATH=/usr/local/cuda/include export CUDA_LIB_PATH=/usr/local/cuda/lib
  2. qmake -r
  3. make -j 4 release

First error was sys/cdefs.h No such file or directory

This error has been solved by changing qmake -r to qmake -r CONFIG+=x64.

Second error was -lcudart No such file or directory

This error has been solved by changing -lcudart to -L/usr/local/cuda/lib64 in /ugene-master/src/plugins/smith_waterman/smith_waterman.pri.

After that, completed build.

And I ran ugene -ui and checked Preferences/CUDA.

Cannot load CUDA driver dynamic library.
It is necessary to install latest Nvidia GPU driver for runnning 
GPU-accelerated algorithms on Nvidia hardware.

Why doesn't CUDA work?

ichebyki commented 5 years ago

Hi,

Please check LD_LIBRARY_PATH var It must contain the path to cuda's lib dir

--Igor

ichebyki commented 5 years ago

Also, you can try to run nvidia-smi command to verify that gpu driver is installed correctly This is output of the nvidia-smi on my system:

$ nvidia-smi
Wed Oct  2 21:49:27 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00    Driver Version: 418.87.00    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K20c          Off  | 00000000:01:00.0 Off |                    0 |
| 30%   32C    P8    16W / 225W |      0MiB /  4743MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
lanqiugit commented 5 years ago

Hi,

LD_LIBRARY_PATH var is

$echo $LD_LIBRARY_PATH
 :/usr/local/cuda/lib

Driver information

$nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00    Driver Version: 418.87.00    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2080    On   | 00000000:01:00.0  On |                  N/A |
| 34%   34C    P8     3W / 215W |    368MiB /  7949MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1148      G   /usr/lib/xorg/Xorg                            18MiB |
|    0      1234      G   /usr/bin/gnome-shell                          57MiB |
|    0      1558      G   /usr/lib/xorg/Xorg                            97MiB |
|    0      1718      G   /usr/bin/gnome-shell                         185MiB |
|    0      5196      G   .../Qt5.13.1/Tools/QtCreator/bin/qtcreator     6MiB |
+-----------------------------------------------------------------------------+
$which nvcc
/usr/local/cuda/bin/nvcc
$nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

And I overlooked error messages of qmake -r CONFIG+=x64

Reading /home/.../ugene-master/src/plugins/smith_waterman/smith_waterman.pro
QDir::mkpath: Empty or null file name
WARNING: nvzz: Cannot access directory ''
lanqiugit commented 5 years ago

Hi, @ichebyki

I try to solve the the error of qmake -r CONFIG+=x64.
The error message is as follow.

Reading /home/.../ugene-master/src/plugins/smith_waterman/smith_waterman.pro
QDir::mkpath: Empty or null file name
WARNING: nvzz: Cannot access directory ''

But I can't solve this.

Would you lend me a hand, please?

ichebyki commented 4 years ago

Close as the issue is too old