MathGroup Archive 2012

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

Search the Archive

OpenCL OpenCLFractalRender3D invalid binary error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125336] OpenCL OpenCLFractalRender3D invalid binary error
  • From: Bert RAM Aerts <bert.ram.aerts at gmail.com>
  • Date: Wed, 7 Mar 2012 05:37:47 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

I have a Dell Inspiron 1720 with 
Core 2 Duo 7300
Linux Mageia 1 x86_64
nVIDIA GeForce 8600M GT with latest driver NVIDIA-Linux-x86_64-295.20.run
Mathematica 8.0.4.0 Home Edition x86_64
~/.Mathematica/Paclets/Repository/CUDAResources-Lin64-8.0.4.1

Following commands all work fine:
---------------------------------

Needs["OpenCLLink`"]
OpenCLQ[]
True
OpenCLInformation[]
{1 -> {"Version" -> "OpenCL 1.1 CUDA 4.2.1", "Name" -> "NVIDIA CUDA", 
   "Vendor" -> "NVIDIA Corporation", 
   "Extensions" -> {"cl_khr_byte_addressable_store", "cl_khr_icd", 
     "cl_khr_gl_sharing", "cl_nv_compiler_options", 
     "cl_nv_device_attribute_query", "cl_nv_pragma_unroll"}, 
   1 -> {"Type" -> "GPU", "Name" -> "GeForce 8600M GT", 
     "Version" -> "OpenCL 1.0 CUDA", 
     "Extensions" -> {"cl_khr_byte_addressable_store", "cl_khr_icd", 
       "cl_khr_gl_sharing", "cl_nv_compiler_options", 
       "cl_nv_device_attribute_query", "cl_nv_pragma_unroll", 
       "cl_khr_global_int32_base_atomics", 
       "cl_khr_global_int32_extended_atomics"}, 
     "Driver Version" -> "295.20", "Vendor" -> "NVIDIA Corporation", 
     "Profile" -> "FULL_PROFILE", "Vendor ID" -> 4318, 
     "Compute Units" -> 4, "Core Count" -> 32, 
     "Maximum Work Item Dimensions" -> 3, 
     "Maximum Work Item Sizes" -> {512, 512, 64}, 
     "Maximum Work Group Size" -> 512, 
     "Preferred Vector Width Character" -> 1, 
     "Preferred Vector Width Short" -> 1, 
     "Preferred Vector Width Integer" -> 1, 
     "Preferred Vector Width Long" -> 1, 
     "Preferred Vector Width Float" -> 1, 
     "Preferred Vector Width Double" -> 0, 
     "Maximum Clock Frequency" -> 950, "Address Bits" -> 32, 
     "Maximum Memory Allocation Size" -> 134217728, 
     "Image Support" -> True, "Maximum Read Image Arguments" -> 128, 
     "Maximum Write Image Arguments" -> 8, 
     "Maximum Image2D Width" -> 4096, 
     "Maximum Image2D Height" -> 16383, 
     "Maximum Image3D Width" -> 2048, 
     "Maximum Image3D Height" -> 2048, 
     "Maximum Image3D Depth" -> 2048, "Maximum Samplers" -> 16, 
     "Maximum Parameter Size" -> 4352, 
     "Memory Base Address Align" -> 2048, 
     "Memory Data Type Align Size" -> 128, 
     "Floating Point Precision Configuration" -> {"Infinity", "NaNs", 
       "Round to Nearest", "Round to Infinity", "Round to Zero", 
       "IEEE754-2008 Fused MAD"}, 
     "Global Memory Cache Type" -> "None", 
     "Global Memory Cache Line Size" -> 0, 
     "Global Memory Cache Size" -> 0, 
     "Global Memory Size" -> 268107776, 
     "Maximum Constant Buffer Size" -> 65536, 
     "Maximum Constant Arguments" -> 9, 
     "Local Memory Type" -> "Local", "Local Memory Size" -> 16384, 
     "Error Correction Support" -> False, 
     "Profiling Timer Resolution" -> 1000, "Endian Little" -> True, 
     "Available" -> True, "Compiler Available" -> True, 
     "Execution Capabilities" -> {"Kernel Execution"}, 
     "Command Queue Properties" -> {"Out of Order Execution", 
       "Profiling Enabled"}}}}

doubleFun = OpenCLFunctionLoad["
    __kernel void doubleVec(__global mint * in,  mint length) {
        int index = get_global_id(0);
    
    	if (index < length)
    	  in[index] = 2*in[index];
      }", "doubleVec", {{_Integer}, _Integer}, 256]
vec = Range[20];
doubleFun[vec, 20]

OpenCLMersenneTwister[100]

srcf = FileNameJoin[{$OpenCLLinkPath, "SupportFiles", 
   "FFT_Kernels.cl"}]
in = RandomReal[1.0, 1024];
out = ConstantArray[0.0, 1024];
MapThread[Complex, fft[in, out, 64]][[;; 50]]

But following command returns an error:
---------------------------------------

OpenCLFractalRender3D[]
OpenCLFunctionLoad::invbin: OpenCLLink encountered an invalid binary.

Please note that the nVIDIA driver already contains CUDA 4.2.1 OpenCL
1.1 as shown in OpenCLInformation[], while Mathematica CUDA is still at
version 4 and not the latest 4.1. Second note: GeForce 8600M GT does
not support doubles, only floats.

How can I obtain an error message that tells me more?

My installation should be fine as CUDA is OK:
---------------------------------------------

All examples from CUDA that I tried out, work fine like e.g. Mandelbulb

Needs["CUDALink`"]
CUDAQ[]
width = 640;
height = 480;
iconfig = {width, height, 1, 0, 1, 6};
config = {0.001, 0.0, 0.0, 0.0, 8.0, 15.0, 10.0, 5.0};
camera = {{2.0, 2.0, 2.0}, {0.0, 0.0, 0.0}};
AppendTo[camera, Normalize[camera[[2]] - camera[[1]]]];
AppendTo[camera, 
  0.75*Normalize[Cross[camera[[3]], {0.0, 1.0, 0.0}]]];
AppendTo[camera, 0.75*Normalize[Cross[camera[[4]], camera[[3]]]]];
config = Join[{config, Flatten[camera]}];
pixelsMem = CUDAMemoryAllocate["Float", {height, width, 3}]
srcf = FileNameJoin[{$CUDALinkPath, "SupportFiles", "mandelbulb.cu"}]
mandelbulb = 
 CUDAFunctionLoad[{srcf}, 
  "MandelbulbGPU", {{"Float", _, "Output"}, {"Float", _, 
    "Input"}, {"Integer32", _, "Input"}, "Integer32", "Float", 
   "Float"}, {16}, "UnmangleCode" -> False]
mandelbulb[pixelsMem, Flatten[config], iconfig, 0, 0.0, 
  0.0, {width*height*3}];
pixels = CUDAMemoryGet[pixelsMem];
Image[pixels]



  • Prev by Date: Re: problems with Rasterize
  • Next by Date: Existence of a column in a table in an if loop
  • Previous by thread: Re: Plotting a simple line at a weibull
  • Next by thread: Re: OpenCL OpenCLFractalRender3D invalid binary error