7

I've upgraded to Mathematica 9.0 on Ubuntu 12.04 with the latest Nvidia driver (304.64). I load CUDA by using, as usual, Needs["CUDALink`"].

CUDAQ[] reports True.
CUDAInformation[] reports:

{1 -> {"Name" -> "GeForce GT 330M", "Clock Rate" -> 1265000, 
   "Compute Capabilities" -> 1.2, "GPU Overlap" -> 1, 
   "Maximum Block Dimensions" -> {512, 512, 64}, 
   "Maximum Grid Dimensions" -> {65535, 65535, 1}, 
   "Maximum Threads Per Block" -> 512, 
   "Maximum Shared Memory Per Block" -> 16384, 
   "Total Constant Memory" -> 65536, "Warp Size" -> 32, 
   "Maximum Pitch" -> 2147483647, 
   "Maximum Registers Per Block" -> 16384, "Texture Alignment" -> 256,
    "Multiprocessor Count" -> 6, "Core Count" -> 48, 
   "Execution Timeout" -> 1, "Integrated" -> False, 
   "Can Map Host Memory" -> True, "Compute Mode" -> "Default", 
   "Texture1D Width" -> 8192, "Texture2D Width" -> 65536, 
   "Texture2D Height" -> 32768, "Texture3D Width" -> 2048, 
   "Texture3D Height" -> 2048, "Texture3D Depth" -> 2048, 
   "Texture2D Array Width" -> 8192, "Texture2D Array Height" -> 8192, 
   "Texture2D Array Slices" -> 512, "Surface Alignment" -> 256, 
   "Concurrent Kernels" -> False, "ECC Enabled" -> False, 
   "TCC Enabled" -> False, "Total Memory" -> 1073414144}}

It seems that everything works. But if try to perform the following:

randM = RandomReal[1, {1000, 1000}];
CUDADot[randM, randM];

I get:

CUDADot::notinit: CUDALink is not initialized.

What does it mean? I already tryied googling looking for the error message... nothing found. Thanks in advice to whom can shed light.

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
HopfMap
  • 71
  • 2
  • 1
    I formatted your question. Please read this: editing help. – Mr.Wizard Feb 27 '13 at 10:07
  • 1
    Since you mention that you just upgraded to v9, it may be worth running CUDAResourcesInstall[Update->True]. I had problems with CUDA in 9 because it tried to use the v8 resources. But in that case not even CUDAQ[] gave True. It's probably not the cause of the problem, but it's worth a try. Be prepared for a longish download though. – Szabolcs Feb 27 '13 at 15:44
  • I've tried CUDAResourcesInstall[Update->True] and CUDAResourcesUninstall[]. CUDADot is still not working. – HopfMap Feb 27 '13 at 17:36
  • 1
    Same for me on Fedora 18; everything in SystemInformation[] -> Links -> CUDA seems fine. – b.gates.you.know.what Feb 28 '13 at 10:09
  • everything in SystemInformation[] -> Links -> CUDA is fine for me, too. Still CUDADot is not working. Could I ask you which is your Nvidia driver version (mine 304.64)? – HopfMap Feb 28 '13 at 10:34
  • @HopfMap Same, 304.64. – b.gates.you.know.what Mar 01 '13 at 21:10
  • Same problem in Fedora 16 with Mathematica 9. CUDAQ and CUDAInformation works ok. thanks –  Mar 07 '13 at 17:20
  • 1
    @b.gatessucks You mean it doesn't work for you either? So is there anyone at all for whom CUDALink works on Linux? – Szabolcs Mar 07 '13 at 17:59
  • Is this 9.0.0 or 9.0.1? – Ajasja Mar 07 '13 at 18:01
  • @Szabolcs Yes I mean it doesn't work for me but all the "CudaChecks" seem ok. It was working on the same machine, previous Fedora release but can't remember which driver version. – b.gates.you.know.what Mar 07 '13 at 18:21
  • 1
    @HopfMap It seems you're not alone with this issue, so you could consider asking support@wolfram.com. If you manage to work out a solution, please come back and post an answer. Make sure you point them to this comment thread to show that several people are having the same problem on Linux. – Szabolcs Mar 07 '13 at 18:38
  • I have v9.0.1 and am running Ubuntu (precise) with driver 295.41 for a GTX560M. Not having any problem with CUDADot; gives a 3x speedup. – Xerxes Mar 07 '13 at 19:13
  • @Xerxes, which version of gcc did you use to compile the NVIDIA drivers and the CUDA Toolkit? Are you using CUDA 5.0? – Ziofil Apr 10 '13 at 17:20
  • 1
    I contacted Wolfram support. Apparently several other users are affected by this bug, and the developers are looking into it. They will contact me as soon as they have a solution/workaround. I will post as soon as I hear back from them. – Ziofil Apr 10 '13 at 18:13
  • See this answer link. Although it's not a solution that can work for everyone (laptops generally cannot change graphics card), it worked for me. – Ziofil Apr 16 '13 at 22:45

1 Answers1

1

Applied this sample code on a notebook freshly initialized and kernel quit off and on

     Unprotect["`*"]
    ClearAll["`*"];
    Needs["CUDALink`"]
    Needs["OpenCLLink`"]
    Needs["SymbolicC`"]
    OpenCLQ[]
    CUDAResourcesUninstall[]

On a separate cell write

    CCompilers[]
CUDADriverVersion[]
CUDAResourcesInstall[]
$CUDADeviceCount
SystemInformation[]

Look very the CCompilers returns. There is an issue with the GCC compiler and shall see if you might be required to back to an older version or upgrade it. Post the results of the code sample provided.