user1837601
user1837601

Reputation: 11

CUDA Mathlink in Mathematica 8.0 Not Installing

I have created a simple example for CUDA and Mathlink based on the website here:

http://hpc.nomad-labs.com/archives/3

When I attempt to install the function in Mathematica using "Install[...]", Mathematica never finishes the installation of that function. I created and tested a simple C function that I am able to install in Mathematica without a function.

The error seems to occur when I link in the CUDA libraries even if I don't have a CUDA function in the file.

To clarify, I don't want to use the package CUDALink. I want to load the CUDA function as a C function in Mathematica. I have a working version of my program using CUDALink but I can't control the stack and heap size with CUDALink. By creating a C program and using the command "Install[...]", I have control over stack size and heap size.

Am I missing something here?

I am using Ubuntu 12.04 with CUDA 4.2.

Does anyone have a working example of CUDA and Mathlink in Mathematica 8.0?

Upvotes: 0

Views: 353

Answers (1)

lashgar
lashgar

Reputation: 5430

First, you need to install CUDAResource. Download the proper LINUX paclet from here. Subsequently, open mathematica and install the paclet using following mathematica command:

CUDAResourcesInstall["/path/to/CUDAResources-Lin64-8.0.4.1.paclet", Update->True]

Then, run the following command to import the CUDA utilities at the command line of mathematica:

Needs["CUDALink`"]

Now follow this manual to compile your code or this one to see the list of available built-in utilities.

Upvotes: 0

Related Questions