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

Error making Beagle library with CUDA option - WSL_Ubuntu_20.04 #169

Open
gardnerbp opened this issue Dec 5, 2021 · 3 comments
Open

Error making Beagle library with CUDA option - WSL_Ubuntu_20.04 #169

gardnerbp opened this issue Dec 5, 2021 · 3 comments

Comments

@gardnerbp
Copy link

Making Beagle library from scratch with these commands
git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git
cd beagle-lib
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DBUILD_OPENCL=OFF -DBUILD_CUDA=ON ..
sudo make install

results in error message
[ 70%] Linking CXX shared library libhmsbeagle-cuda.so
/usr/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
make[2]: *** [libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/build.make:146: libhmsbeagle/GPU/CMake_CUDA/libhmsbeagle-cuda.so.40.0.0] Error 1

There is no cuda library installed by the CUDA toolkit. Changing the link.txt file to delete -lcuda or changing it to -lcudart allows the MAKE program to complete successfully (so I thought).

Running example hmctest in DEBUG mode fails to load the Beagle GPU plugin with the following error:
Loading hmsbeagle-cpu-sse
Loading hmsbeagle-cuda
Unable to load hmsbeagle-cuda: /usr/local/lib/libhmsbeagle-cuda.so.40.0.0: undefined symbol: cuModuleLoadData
Loading hmsbeagle-opencl
Unable to load hmsbeagle-opencl: libhmsbeagle-opencl.so.40.0.0: cannot open shared object file: No such file or directory
Available resources:
Resource 0:
Name : CPU (x86_64)
Desc :
Flags: PROCESSOR_CPU PRECISION_DOUBLE PRECISION_SINGLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALING_DYNAMIC SCALERS_RAW SCALERS_LOG VECTOR_NONE VECTOR_SSE THREADING_NONE FRAMEWORK_CPU

Using resource 0:
Rsrc Name : CPU (x86_64)
Impl Name : CPU-4State-SSE-Double
Impl Desc : none

Please fix this so that a NVIDIA GeForce RTX 2070 using the latest CUDA Toolkit 11.5.1 can use Beagle successfully.

@lpmor22
Copy link

lpmor22 commented Nov 4, 2022

I have the same issue - NVIDIA GeForce RTX 2080

@Tay-j
Copy link

Tay-j commented Aug 15, 2023

Has anyone found a solution to this? I have an NVIDIA RTX 3080 and I encounter the same error with WSL.

@CSTE7007
Copy link

CSTE7007 commented Sep 1, 2023

I am facing same kind of error while trying to install in Kaggle though the installation worked fine on google colab.

[ 70%] Linking CXX shared library libhmsbeagle-cuda.so
/usr/bin/ld: cannot find -lcuda: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/build.make:162: libhmsbeagle/GPU/CMake_CUDA/libhmsbeagle-cuda.so.40.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:293: libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

!lsb_release -a output:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy

!lscpu output:

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Xeon(R) CPU @ 2.00GHz
    CPU family:          6
    Model:               85
    Thread(s) per core:  2
    Core(s) per socket:  1
    Socket(s):           1
    Stepping:            3
    BogoMIPS:            4000.28
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscal
                         l nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopo
                         logy nonstop_tsc cpuid tsc_known_freq pni pclmulqdq sss
                         e3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes 
                         xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefe
                         tch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase ts
                         c_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx a
                         vx512f avx512dq rdseed adx smap clflushopt clwb avx512c
                         d avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat
                          md_clear arch_capabilities
Virtualization features: 
  Hypervisor vendor:     KVM
  Virtualization type:   full
Caches (sum of all):     
  L1d:                   32 KiB (1 instance)
  L1i:                   32 KiB (1 instance)
  L2:                    1 MiB (1 instance)
  L3:                    38.5 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0,1
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Mitigation; PTE Inversion
  Mds:                   Mitigation; Clear CPU buffers; SMT Host state unknown
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Vulnerable: Clear CPU buffers attempted, no microcode; 
                         SMT Host state unknown
  Retbleed:              Mitigation; IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
                          and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, STIBP conditional, 
                         RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Mitigation; Clear CPU buffers; SMT Host state unknown

!nvidia-smi output:

Fri Sep  1 13:35:09 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla P100-PCIE...  Off  | 00000000:00:04.0 Off |                    0 |
| N/A   30C    P0    26W / 250W |      0MiB / 16280MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

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

4 participants