Message Boards Message Boards

GROUPS:

Issue with CUDA Functionality in Mathematica 12.1

Posted 1 month ago
484 Views
|
5 Replies
|
1 Total Likes
|

Following a demo notebook created by Michael Kelly

   Needs["CUDALink`"];

    CUDAQ[]

TRUE

    CUDAInformation[]
{1 -> {"Name" -> "Quadro FX 1800", "Clock Rate" -> 1375000, 
   "Compute Capabilities" -> 1.1, "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" -> 8192, "Texture Alignment" -> 256, 
   "Multiprocessor Count" -> 8, "Core Count" -> 64, 
   "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" -> 805306368}}

I have checked that the latest driver version is installed. Also checked that the required CUDA resources paclet is installed:

CUDAResourcesInstall["C:\\Users\\JKinlay\\Dropbox\\Cuda\\\
CUDAResources-Win64-12.1.0.paclet"]

PacletInstall::samevers: A paclet named CUDAResources with the same version number (12.1.0) is already installed. Use PacletUninstall to remove the existing version first, or call PacletInstall with ForceVersionInstall -> True.

Everything seems fine.

Test CUDAFinancialDerivative:

    numberOfOptions = 100000;
    spotPrices = RandomReal[{25.0, 35.0}, numberOfOptions];
    strikePrices = RandomReal[{20.0, 40.0}, numberOfOptions];
    expiration = RandomReal[{0.1, 10.0}, numberOfOptions];
    interest = RandomReal[{0.04, 0.1}, numberOfOptions];
    volatility = RandomReal[{0.10, 0.50}, numberOfOptions];
    dividend = RandomReal[{0.02, 0.06}, numberOfOptions];

    AbsoluteTiming[
     CUDAFinancialDerivative[{"AsianArithmetic", 
        "Call"}, {"StrikePrice" -> strikePrices, 
        "Expiration" -> expiration}, {"CurrentPrice" -> spotPrices, 
        "InterestRate" -> interest, "Volatility" -> volatility, 
        "Dividend" -> dividend}];]
CUDAFunction::liblnch: During the evaluation, an error LIBRARY_TYPE_ERROR was raised when launching the library function.

I get the same error message, regardless of the number / type of option contracts.

Test another CUDA function:

    lst = RandomReal[1., {10}];
    CUDAFourier[lst]

CUDAFourier::unknown: CUDALink experienced an unknown error.

It seems that CUDA functionality has failed completely.

5 Replies

Just did a quick test on your inputs, attached is the notebook result, there is Infinity output for the financial one, took the tesla kepler 3.7 gpu 30 second to evaluate,

CUDAFourier[lst] return immediately,

Attachments:

It could be that Wolfram no longer supports the rather antiquated graphics card I'm using. But CudaQ[] = True and I would expect it to = False if that were the case.

Another possible explanation is that I am accessing the computer remotely. Obviously I am aware that GPU is not supported using Remote Desktop; but I have tested using both AnyDesk and TeamViewer, both of which has worked on this machine in previous Mathematica versions. Neither works now.

I am using Mathematica 12.1 on the test,

As far as I know, there is a thing called unified memory access in cuda, but only starting from compute capability 3.0 and above, then can automate the memory copy process between host and device. the original cuda programming, one need to copy the data from host to device to do the compute, then copy the result back,

Posted 1 month ago

I tested the notebook and got the same error independant of the number of options. I use Windows 10 with :

{1 -> {"Name" -> "Quadro M1000M", "Clock Rate" -> 1071500, 
   "Compute Capabilities" -> 5.`, "GPU Overlap" -> 1, 
   "Maximum Block Dimensions" -> {1024, 1024, 64}, 
   "Maximum Grid Dimensions" -> {2147483647, 65535, 65535}, 
   "Maximum Threads Per Block" -> 1024, 
   "Maximum Shared Memory Per Block" -> 49152, 
   "Total Constant Memory" -> 65536, "Warp Size" -> 32, 
   "Maximum Pitch" -> 2147483647, 
   "Maximum Registers Per Block" -> 65536, "Texture Alignment" -> 512,
    "Multiprocessor Count" -> 4, "Core Count" -> 512, 
   "Execution Timeout" -> 1, "Integrated" -> False, 
   "Can Map Host Memory" -> True, "Compute Mode" -> "Default", 
   "Texture1D Width" -> 65536, "Texture2D Width" -> 65536, 
   "Texture2D Height" -> 65536, "Texture3D Width" -> 4096, 
   "Texture3D Height" -> 4096, "Texture3D Depth" -> 4096, 
   "Texture2D Array Width" -> 16384, 
   "Texture2D Array Height" -> 16384, 
   "Texture2D Array Slices" -> 2048, "Surface Alignment" -> 512, 
   "Concurrent Kernels" -> True, "ECC Enabled" -> False, 
   "TCC Enabled" -> False, "Total Memory" -> 2147483648}}
Driver version 442.19

CUDAFunction::liblnch: During the evaluation, an error LIBRARY_FUNCTION_ERROR was raised when launching the library function.

However I updated my driver to version 442.92 and now it's work a little bit. with 256 options no problem. With 512 it starts generating the error message again. With a fresh kernel and 512 options it works one or two times and then the error message appears again. I would call Wolfram Support.

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