accelerate-llvm-ptx: cannot find /usr/nvvm/libdevice

76 views
Skip to first unread message

Henning Thielemann

unread,
Nov 29, 2017, 3:41:12 AM11/29/17
to Accelerate Project

I try to install accelerate-llvm-ptx and the directory /usr/nvvm/libdevice
seems to be missing:

Data/Array/Accelerate/LLVM/PTX/Compile/Libdevice/Load.hs:106:23: error:
• Exception when trying to run compile-time code:
/usr/nvvm/libdevice: getDirectoryContents:openDirStream: does not exist (No such file or directory)
Code: libdeviceBitcode (Compute 3 5)
• In the Template Haskell splice $$(libdeviceBitcode (Compute 3 5))
In the expression: $$(libdeviceBitcode (Compute 3 5))
In an equation for ‘libdevice_35_bc’:
libdevice_35_bc = $$(libdeviceBitcode (Compute 3 5))
|
106 | libdevice_35_bc = $$( libdeviceBitcode (Compute 3 5) )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-5023/accelerate-llvm-ptx-1.1.0.0'


I have installed some CUDA packages that are shipped by Ubuntu:

$ dpkg --list "*cuda*"
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-=======================-================-================-===================================================
un cuda-license-7-5 <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1204 <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1404 <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1404-7- <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1410 <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1504 <keine> <keine> (keine Beschreibung vorhanden)
un cuda-repo-ubuntu1504-7- <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-5.0-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-5.5-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-6.0-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-6.5-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-7.0-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-7.5-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda-8.0-1 <keine> <keine> (keine Beschreibung vorhanden)
un libcuda1 <keine> <keine> (keine Beschreibung vorhanden)
ii libcuda1-375 384.90-0ubuntu0. amd64 Transitional package for libcuda1-384
ii libcuda1-384 384.90-0ubuntu0. amd64 NVIDIA CUDA runtime library
ii libcudart7.5:amd64 7.5.18-0ubuntu1 amd64 NVIDIA CUDA Runtime Library
ii nvidia-cuda-dev 7.5.18-0ubuntu1 amd64 NVIDIA CUDA development files
ii nvidia-cuda-doc 7.5.18-0ubuntu1 all NVIDIA CUDA and OpenCL documentation
ii nvidia-cuda-gdb 7.5.18-0ubuntu1 amd64 NVIDIA CUDA Debugger (GDB)
ii nvidia-cuda-toolkit 7.5.18-0ubuntu1 amd64 NVIDIA CUDA development toolkit

What other packages do I have to install? Or shall I deinstall all CUDA
packages from Ubuntu and install the ones from nvidia.com (cuda-9.0)
instead?

Trevor McDonell

unread,
Nov 29, 2017, 4:37:49 AM11/29/17
to accelerat...@googlegroups.com
Hi Henning,

I haven't tried using the ubuntu packages in a while (for a very long time they were stuck at an extremely old version). Maybe there is a separate libnvvm package not included with nvidia-cuda-dev? It probably should work, but if for some reason the ubuntu packages decided to rearrange the directory/file structure from the standard CUDA install, it might be a bit of a hassle.

I'd suggest trying with the installer from nvidia.com. If you are using the version of accelerate-llvm-ptx on Hackage, stick to cuda-8 (or earlier). If you are following the github repository, that one should also work with cuda-9.

Cheers,
-Trev


--
You received this message because you are subscribed to the Google Groups "Accelerate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelerate-hask...@googlegroups.com.
Visit this group at https://groups.google.com/group/accelerate-haskell.
For more options, visit https://groups.google.com/d/optout.

Henning Thielemann

unread,
Nov 29, 2017, 4:48:15 AM11/29/17
to Accelerate Project

On Wed, 29 Nov 2017, Trevor McDonell wrote:

> I'd suggest trying with the installer from nvidia.com. If you are using
> the version of accelerate-llvm-ptx on Hackage, stick to cuda-8 (or
> earlier). If you are following the github repository, that one should
> also work with cuda-9.

The official download site only provides cuda-9. Any idea how I can fetch
cuda-8 from there?

Henning Thielemann

unread,
Nov 29, 2017, 4:49:57 AM11/29/17
to Accelerate Project

On Wed, 29 Nov 2017, Trevor McDonell wrote:

> I haven't tried using the ubuntu packages in a while (for a very long
> time they were stuck at an extremely old version). Maybe there is a
> separate libnvvm package not included with nvidia-cuda-dev? It probably
> should work, but if for some reason the ubuntu packages decided to
> rearrange the directory/file structure from the standard CUDA install,
> it might be a bit of a hassle.

I found:

$ ll /usr/lib/nvidia-cuda-toolkit/libdevice
insgesamt 1636
drwxr-xr-x 2 root root 4096 Jun 4 15:49 .
drwxr-xr-x 4 root root 4096 Jun 4 15:49 ..
-rw-r--r-- 1 root root 413320 Sep 19 2015 libdevice.compute_20.10.bc
-rw-r--r-- 1 root root 415812 Sep 19 2015 libdevice.compute_30.10.bc
-rw-r--r-- 1 root root 416828 Sep 19 2015 libdevice.compute_35.10.bc
-rw-r--r-- 1 root root 415812 Sep 19 2015 libdevice.compute_50.10.bc


Is this the right directory? Maybe I can change the path in
accelerate-llvm-ptx.


Thanks,
Henning

Trevor McDonell

unread,
Nov 29, 2017, 5:07:17 AM11/29/17
to accelerat...@googlegroups.com

You can get all the old releases here (linked from the main download page as “legacy releases”):
https://developer.nvidia.com/cuda-toolkit-archive

If you want to hack accelerate-llvm-ptx to point to ubuntu install location, change this line.

Cheers,
-Trev


Trevor McDonell

unread,
Nov 29, 2017, 5:26:34 AM11/29/17
to accelerat...@googlegroups.com
Actually, if this is the default install location for ubuntu, it is probably worthwhile looking in that directory if the usual place is not found. I'll look into it later (it is getting late here).

-Trev

Henning Thielemann

unread,
Nov 29, 2017, 5:46:44 AM11/29/17
to Accelerate Project

On Wed, 29 Nov 2017, Trevor McDonell wrote:

> You can get all the old releases here (linked from the main download page as “legacy releases”):
> https://developer.nvidia.com/cuda-toolkit-archive
>
> If you want to hack accelerate-llvm-ptx to point to ubuntu install location, change this line.

With the adapted path I can compile accelerate-llvm-ptx and run a
benchmark.

Meanwhile the download of CUDA-8.0 is still in progress ...
Reply all
Reply to author
Forward
0 new messages