MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: CUDA, Nvidia and Linux issue

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121087] Re: CUDA, Nvidia and Linux issue
  • From: Bert Aerts <bert.ram.aerts at gmail.com>
  • Date: Fri, 26 Aug 2011 05:26:15 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j2vsvm$2jg$1@smc.vnet.net>

Hi,

I have Mathematica 8.0.1 on Mageia 1 x86_64 with nVIDIA 280.13
	$Version
	"8.0 for Linux x86 (64-bit) (February 23, 2011)"

I just automatically downloaded and installed the 8.0.1.2 CUDA paclet by
	Needs["CUDALink`"]
	CUDAResourcesInformation[]
	CUDAInformation[]
	CUDAQ[]

I have gcc and g++ 4.5.2
	[bert@Dell1720Mageia1 ~]$ gcc --version
	gcc (GCC) 4.5.2
	[bert@Dell1720Mageia1 ~]$ g++ --version
	g++ (GCC) 4.5.2

To get the CUDAFunctionLoad examples to work without the message
"unsupported GNU version! gcc 4.5 and up are not supported!"
Comment out line 82 of
/home/bert/.Mathematica/Paclets/Repository/CUDAResources-Lin64-8.0.1.2/CUDAToolkit/include/host_config.h
You will now see that gcc version 4.5.2 produces correct results.

I noticed that CUDA toolkit 4.0.17 is used now in 8.0.1.2 (previous
version 8.0.1.1 still used CUDA toolkit 3.2.16) as can be seen in:

[bert@Dell1720Mageia1 lib64]$ pwd
/home/bert/.Mathematica/Paclets/Repository/CUDAResources-Lin64-8.0.1.2/CUDAToolkit/lib64
[bert@Dell1720Mageia1 lib64]$ ls -al
total 989948
drwxrwxr-x 2 bert bert      4096 Aug 25 21:42 ./
drwxrwxr-x 8 bert bert      4096 Aug 25 21:40 ../
-rw------- 1 bert bert       121 Aug 25 21:42 .directory
-rw-rw-r-- 1 bert bert 129409864 Aug 25 21:40 libcublas.so
-rw-rw-r-- 1 bert bert 129409864 Aug 25 21:40 libcublas.so.4
-rw-rw-r-- 1 bert bert 129409864 Aug 25 21:40 libcublas.so.4.0.17
-rw-rw-r-- 1 bert bert    443136 Aug 25 21:40 libcudart.so
-rw-rw-r-- 1 bert bert    443136 Aug 25 21:40 libcudart.so.4
-rw-rw-r-- 1 bert bert    443136 Aug 25 21:40 libcudart.so.4.0.17
-rw-rw-r-- 1 bert bert  87620720 Aug 25 21:40 libcufft.so
-rw-rw-r-- 1 bert bert  87620720 Aug 25 21:40 libcufft.so.4
-rw-rw-r-- 1 bert bert  87620720 Aug 25 21:40 libcufft.so.4.0.17
-rw-rw-r-- 1 bert bert  25355552 Aug 25 21:40 libcurand.so
-rw-rw-r-- 1 bert bert  25355552 Aug 25 21:40 libcurand.so.4
-rw-rw-r-- 1 bert bert  25355552 Aug 25 21:40 libcurand.so.4.0.17
-rw-rw-r-- 1 bert bert  49395592 Aug 25 21:40 libcusparse.so
-rw-rw-r-- 1 bert bert  49395592 Aug 25 21:40 libcusparse.so.4
-rw-rw-r-- 1 bert bert  49395592 Aug 25 21:40 libcusparse.so.4.0.17
-rw-rw-r-- 1 bert bert  45654504 Aug 25 21:40 libnpp.so
-rw-rw-r-- 1 bert bert  45654504 Aug 25 21:40 libnpp.so.4
-rw-rw-r-- 1 bert bert  45654504 Aug 25 21:40 libnpp.so.4.0.17

This way of working with multiple versions of the same file is very
harddisk space consuming - this should be done with symbolic links as in:

[bert@Dell1720Mageia1 lib64]$ pwd
/usr/local/cuda/lib64
[bert@Dell1720Mageia1 lib64]$ ls -al
total 328844
drwxr-xr-x  2 root root      4096 Jun 19 21:55 ./
drwxr-xr-x 11 root root      4096 Jun 19 22:05 ../
lrwxrwxrwx  1 root root        14 Jun 19 21:55 libcublas.so ->
libcublas.so.4*
lrwxrwxrwx  1 root root        19 Jun 19 21:55 libcublas.so.4 ->
libcublas.so.4.0.17*
-rwxr-xr-x  1 root root 129201304 Jun 19 21:55 libcublas.so.4.0.17*
lrwxrwxrwx  1 root root        14 Jun 19 21:55 libcudart.so ->
libcudart.so.4*
lrwxrwxrwx  1 root root        19 Jun 19 21:55 libcudart.so.4 ->
libcudart.so.4.0.17*
-rwxr-xr-x  1 root root    328560 Jun 19 21:55 libcudart.so.4.0.17*
lrwxrwxrwx  1 root root        13 Jun 19 21:55 libcufft.so -> libcufft.so.4*
lrwxrwxrwx  1 root root        18 Jun 19 21:55 libcufft.so.4 ->
libcufft.so.4.0.17*
-rwxr-xr-x  1 root root  87483032 Jun 19 21:55 libcufft.so.4.0.17*
lrwxrwxrwx  1 root root        14 Jun 19 21:55 libcurand.so ->
libcurand.so.4*
lrwxrwxrwx  1 root root        19 Jun 19 21:55 libcurand.so.4 ->
libcurand.so.4.0.17*
-rwxr-xr-x  1 root root  25372016 Jun 19 21:55 libcurand.so.4.0.17*
lrwxrwxrwx  1 root root        16 Jun 19 21:55 libcusparse.so ->
libcusparse.so.4*
lrwxrwxrwx  1 root root        21 Jun 19 21:55 libcusparse.so.4 ->
libcusparse.so.4.0.17*
-rwxr-xr-x  1 root root  49174616 Jun 19 21:55 libcusparse.so.4.0.17*
lrwxrwxrwx  1 root root        11 Jun 19 21:55 libnpp.so -> libnpp.so.4*
lrwxrwxrwx  1 root root        16 Jun 19 21:55 libnpp.so.4 ->
libnpp.so.4.0.17*
-rwxr-xr-x  1 root root  45152440 Jun 19 21:55 libnpp.so.4.0.17*

This is the CUDA Toolkit 4.0.17 directly from nVIDIA's website. Notice
the difference in file size with the Mathematica ones.

All my Mathematica CUDA examples work perfectly with 8.0.1.2.

My suggestions:
+ use Mathematica 8.0.1 to install CUDAResources-Lin64-8.0.1.2
+ use latest nVIDIA recommended driver 280.13 to be sure you have the
CUDA driver 4.0

Kind regards,

Bert


On 23/08/11 11:47, Paperorbifold wrote:
> I've Mathematica 8 installed on my laptop with Ubuntu 11.04 64bit and with 
> nvidia drivers (ver. 270.41.06). The graphic card is a GT 330M.
> The CUDALink works flawlessly with the paclet version CUDAResources-
> Lin64-8.0.0.6 but not with the newest version CUDAResources-Lin64-8.0.1.2.
> The environment variables are correctly setted:
> export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib64/nvidia-current/libnvidia-tls.so
> export CUDA_LIBRARY_PATH=/usr/lib64/nvidia-current/libcuda.so
> so I'm really puzzled by this behavior.
> The answer of CUDAQ[] in the case 8.0.1.2 is False while CUDAInformation[] 
> reports it's not able to initialize the cuda driver (which are anyway 
> correctly detected).
> Does anyone know what it's going on here?
> Thanks.
> 





  • Prev by Date: Re: FindRoot repeatedly evaluating function
  • Next by Date: Problem with NIntegrating a compiled function
  • Previous by thread: CUDA, Nvidia and Linux issue
  • Next by thread: Re: CUDA, Nvidia and Linux issue