Message Boards Message Boards

CUDALink and MacOS 10.11 (el Capitan)

Posted 9 years ago

Recently upgraded to Mathematica 10.2 and MacOS 10.11 and CUDA stopped working? Firstly, I only noticed this when on the upgrade to 10.2. There may be a similar problem with version 10. Now to the problem. I had the following situation

Needs["CUDALink`"]
CUDAInformation[]

reporting

"CUDA failed to load libraries. Refer to CUDALink System Requirements for system requirements. >>"

Here is what I did to get things working. First, uninstall the old CUDALink paclet, and install the latest version

CUDAResourcesUninstall[]
CUDAResourcesInstall[Update -> True] 

This will take a while to download. At least now the basic CUDALink internals are operational. However one soon discovers that NVCC is not operational. For instance a call to

CUDAFunctionLoad[...]

will result in

"nvcc fatal   : The version ('70000') of the host compiler ('Apple clang') is not supported"

Heading over to the NVidia website and download the CUDA Toolkit. At the time of this posting this could be found at

https://developer.nvidia.com/cuda-downloads/

I used the local installer and installed the whole thing. The final consideration involves passing CUDAFunctionLoad[] the argument "CompilerInstallation" thus

CUDAFunctionLoad[...,"CompilerInstallation" -> "/Developer/NVIDIA/CUDA-x.y/"]

where x.y are the major and minor versions. I suspect that this argument will be required until this compatibility problem is fixed.

POSTED BY: ben mc
2 Replies

I am told that, at least for the situation that I documented, it's the result of having an obsolete CUDALink paclet installed. The advice then was to execute the following.

Needs["CUDALink`"]

CUDAResourcesUninstall[];

PacletSiteUpdate /@ PacletSites[];

CUDAResourcesInstall[];

Note that the process of doing the PacletSiteUpdate may take a little while.

I then restarted Mathematica and executed

Needs["CUDALink`"]

and

CUDAInformation[]

which causes the Kernel to crash. I've reported this and will update as I hear back.

POSTED BY: David Reiss

On my system (OSX 10.11.1) with Mathematica 10.3 executing

Needs["CUDALink`"]

and then

CUDAInformation[]

Yields an output with unevaluated raw code:

1 /. If[Which[Developer`CheckProtectedMode[CUDAInformation], 
   Throw[$Failed], ! TrueQ[GPUTools`Internal`ValidSystemQ[]], 
   Throw[Message[CUDAInformation::invsys, $SystemID]; $Failed], 
   True && ! 
     TrueQ[Quiet[
       StringMatchQ[
        GPUTools`Internal`VideoCardName[], ___ ~~ "NVIDIA" ~~ ___, 
        IgnoreCase -> True]]] && 
    GPUTools`Internal`VideoCardInformation["Description"] =!= 
     "Description", 
   Throw[Message[CUDAInformation::invdevnm, 
     GPUTools`Internal`VideoCardName[]]; $Failed], 
   GPUTools`Internal`$NVIDIADriverLibraryPath === $Failed || ! 
     TrueQ[Quiet[
       DirectoryQ[
        DirectoryName[GPUTools`Internal`$NVIDIADriverLibraryPath]]]], 
   Throw[Message[CUDAInformation::invdriv]; $Failed], 
   TrueQ[Quiet[
     DirectoryQ[GPUTools`Internal`$NVIDIADriverLibraryPath]]], 
   Message[CUDAInformation::invdrivp, 
    DirectoryName[GPUTools`Internal`$NVIDIADriverLibraryPath]]; 
   Return[$Failed], ! 
    TrueQ[GPUTools`Internal`$NVIDIADriverLibraryValidQ], 
   If[GPUTools`Internal`$NVIDIADriverLibraryVersion === $Failed, 
    Message[CUDAInformation::invdrivver], 
    If[GPUTools`Utilities`LibraryGetDirectory[
        GPUTools`Internal`$NVIDIADriverLibraryVersion] =!= $Failed && 
      TrueQ[Quiet[
        DirectoryQ[
         GPUTools`Utilities`LibraryGetDirectory[
          GPUTools`Internal`$NVIDIADriverLibraryVersion]]]], 
     Message[CUDAInformation::invdrivverv, 
      GPUTools`Utilities`LibraryVersionInformationString[
       GPUTools`Internal`$NVIDIADriverLibraryVersion]], 
     Message[CUDAInformation::invdrivverd, 
      GPUTools`Utilities`LibraryGetDirectory[
       GPUTools`Internal`$NVIDIADriverLibraryVersion]]]]; 
   Throw[$Failed], GPUTools`Internal`LoadCUDALibraries[] === $Failed, 
   Throw[Message[CUDAInformation::syslibfld]; $Failed], True, True], 
  Throw[Message[CUDAInformation::nodev]; $Failed], Throw[$Failed]]

I will file a bug report....

Note that in my case

CUDAQ[]

returns

False

Presumably CUDAInformation[] should return something sensible (like $Failed) when CUDA is not installed.

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract