Skip to main content

parallelization - Are there any openCL test suites?


I have a new ATI gpu that I have been trying on 3 different distributed computing projects. I get errors on each work unit.


The errors indicate No Protocol which could be caused by a bad environment variable that doesn't point to the correct path.


On Linux, Mathematica returns $Failed for this:


Environment["ATISTREAMSDKROOT"]

So, I was wondering if there is a test suite that would validate the calculations of such a card?


{1->{Version->OpenCL 1.2 AMD-APP (923.1),Name->AMD Accelerated Parallel   Processing,Vendor->Advanced Micro Devices, Inc.,Extensions->{cl_khr_icd,cl_amd_event_callback,cl_amd_offline_devices},1->{Type->GPU,Name->Cypress,Version->OpenCL 1.2 AMD-APP (923.1),Extensions->{cl_khr_fp64,cl_amd_fp64,cl_khr_global_int32_base_atomics,cl_khr_global_int32_extended_atomics,cl_khr_local_int32_base_atomics,cl_khr_local_int32_extended_atomics,cl_khr_3d_image_writes,cl_khr_byte_addressable_store,cl_khr_gl_sharing,cl_ext_atomic_counters_32,cl_amd_device_attribute_query,cl_amd_vec3,cl_amd_printf,cl_amd_media_ops,cl_amd_popcnt},Driver Version->CAL 1.4.1741,Vendor->Advanced Micro Devices, Inc.,Profile->FULL_PROFILE,Vendor ID->4098,Compute Units->18,Core Count->1440,Maximum Work Item Dimensions->3,Maximum Work Item Sizes->{256,256,256},Maximum Work Group Size->256,Preferred Vector Width Character->16,Preferred Vector Width Short->16,Preferred Vector Width Integer->4,Preferred Vector Width Long->2,Preferred Vector Width Float->4,Preferred Vector Width Double->2,Maximum Clock Frequency->765,Address Bits->32,Maximum Memory Allocation Size->134217728,Image Support->True,Maximum Read Image Arguments->128,Maximum Write Image Arguments->8,Maximum Image2D Width->8192,Maximum Image2D Height->8192,Maximum Image3D Width->2048,Maximum Image3D Height->2048,Maximum Image3D Depth->2048,Maximum Samplers->16,Maximum Parameter Size->1024,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->536870912,Maximum Constant Buffer Size->65536,Maximum Constant Arguments->8,Local Memory Type->Local,Local Memory Size->32768,Error Correction Support->False,Profiling Timer Resolution->1,Endian Little->True,Available->True,Compiler Available->True,Execution Capabilities->{Kernel Execution},Command Queue Properties->Profiling Enabled},2->{Type->CPU,Name->AMD Phenom(tm) II X6 1100T Processor,Version->OpenCL 1.2 AMD-APP (923.1),Extensions->{cl_khr_fp64,cl_amd_fp64,cl_khr_global_int32_base_atomics,cl_khr_global_int32_extended_atomics,cl_khr_local_int32_base_atomics,cl_khr_local_int32_extended_atomics,cl_khr_int64_base_atomics,cl_khr_int64_extended_atomics,cl_khr_byte_addressable_store,cl_khr_gl_sharing,cl_ext_device_fission,cl_amd_device_attribute_query,cl_amd_vec3,cl_amd_printf,cl_amd_media_ops,cl_amd_popcnt},Driver Version->2.0 (sse2),Vendor->AuthenticAMD,Profile->FULL_PROFILE,Vendor ID->4098,Compute Units->6,Core Count->6,Maximum Work Item Dimensions->3,Maximum Work Item Sizes->{1024,1024,1024},Maximum Work Group Size->1024,Preferred Vector Width Character->16,Preferred Vector Width Short->16,Preferred Vector Width Integer->4,Preferred Vector Width Long->2,Preferred Vector Width Float->4,Preferred Vector Width Double->0,Maximum Clock Frequency->3314,Address Bits->64,Maximum Memory Allocation Size->4215913470,Image Support->True,Maximum Read Image Arguments->128,Maximum Write Image Arguments->8,Maximum Image2D Width->8192,Maximum Image2D Height->8192,Maximum Image3D Width->2048,Maximum Image3D Height->2048,Maximum Image3D Depth->2048,Maximum Samplers->16,Maximum Parameter Size->4096,Memory Base Address Align->1024,Memory Data Type Align Size->128,Floating Point Precision Configuration->{Denorms,Infinity,NaNs,Round to Nearest,Round to Infinity,Round to Zero,IEEE754-2008 Fused MAD},Global Memory Cache Type->Read Write,Global Memory Cache Line Size->64,Global Memory Cache Size->65536,Global Memory Size->16863653880,Maximum Constant Buffer Size->65536,Maximum Constant Arguments->8,Local Memory Type->Global,Local Memory Size->32768,Error Correction Support->False,Profiling Timer Resolution->1,Endian Little->True,Available->True,Compiler Available->True,Execution Capabilities->{Kernel Execution,Native Kernel Execution},Command Queue Properties->Profiling Enabled}}}  

EDIT: when I run an example I get: OpenCLMemoryAllocate::invdev: OpenCLLink device is invalid.



Since the information in the scroll-bar above seems to be complete, I don't have any idea what to fix.


Coda I solved this by running as root. It seems the AMD Linux driver has a slight permissions problem accessing the libaries.



Answer



EDIT: This is only for CUDA, I did not pay proper attention there (feel free to comment on deletion). Doing the same with OpenCL would be considerably more work.


Do you mean something like this? This compares the results for equivalent Map and CUDAMap expressions:


Needs["CUDALink`"]

vals = Table[i, {i, 0, 10, .1}];
m1 = CUDAMap[Cos, vals];
m2 = Map[Cos, vals];


m1 == m2


True



CUDAMap even balks at invalid operations:


CUDAMap[Erf, vals];



CUDAMap::op: Specified operation, Erf, is invalid. Valid operations are: Cos, Sin, Tan, ArcCos, ArcSin, ArcTan, Cosh, Sinh, Exp, Log, Log10, Sqrt, Ceiling, Floor, Abs >>



Comments

Popular posts from this blog

front end - keyboard shortcut to invoke Insert new matrix

I frequently need to type in some matrices, and the menu command Insert > Table/Matrix > New... allows matrices with lines drawn between columns and rows, which is very helpful. I would like to make a keyboard shortcut for it, but cannot find the relevant frontend token command (4209405) for it. Since the FullForm[] and InputForm[] of matrices with lines drawn between rows and columns is the same as those without lines, it's hard to do this via 3rd party system-wide text expanders (e.g. autohotkey or atext on mac). How does one assign a keyboard shortcut for the menu item Insert > Table/Matrix > New... , preferably using only mathematica? Thanks! Answer In the MenuSetup.tr (for linux located in the $InstallationDirectory/SystemFiles/FrontEnd/TextResources/X/ directory), I changed the line MenuItem["&New...", "CreateGridBoxDialog"] to read MenuItem["&New...", "CreateGridBoxDialog", MenuKey["m", Modifiers-...

How to thread a list

I have data in format data = {{a1, a2}, {b1, b2}, {c1, c2}, {d1, d2}} Tableform: I want to thread it to : tdata = {{{a1, b1}, {a2, b2}}, {{a1, c1}, {a2, c2}}, {{a1, d1}, {a2, d2}}} Tableform: And I would like to do better then pseudofunction[n_] := Transpose[{data2[[1]], data2[[n]]}]; SetAttributes[pseudofunction, Listable]; Range[2, 4] // pseudofunction Here is my benchmark data, where data3 is normal sample of real data. data3 = Drop[ExcelWorkBook[[Column1 ;; Column4]], None, 1]; data2 = {a #, b #, c #, d #} & /@ Range[1, 10^5]; data = RandomReal[{0, 1}, {10^6, 4}]; Here is my benchmark code kptnw[list_] := Transpose[{Table[First@#, {Length@# - 1}], Rest@#}, {3, 1, 2}] &@list kptnw2[list_] := Transpose[{ConstantArray[First@#, Length@# - 1], Rest@#}, {3, 1, 2}] &@list OleksandrR[list_] := Flatten[Outer[List, List@First[list], Rest[list], 1], {{2}, {1, 4}}] paradox2[list_] := Partition[Riffle[list[[1]], #], 2] & /@ Drop[list, 1] RM[list_] := FoldList[Transpose[{First@li...

plotting - How to draw lines between specified dots on ListPlot?

I would like to create a plot where I have unconnected dots and some connected. So far, I have figured out how to draw the dots. My code is the following: ListPlot[{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {1, 4}, {2, 5}, {3, 6}, {4, 7}, {1, 7}, {2, 8}, {3, 9}, {4, 10}, {1, 10}, {2, 11}, {3, 12}, {4,13}, {2.5, 7}}, Ticks -> {{1, 2, 3, 4}, None}, AxesStyle -> Thin, TicksStyle -> Directive[Black, Bold, 12], Mesh -> Full] I have thought using ListLinePlot command, but I don't know how to specify to the command to draw only selected lines between the dots. Do have any suggestions/hints on how to do that? Thank you. Answer One possibility would be to use Epilog with Line : ListPlot[ {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {1, 4}, {2, 5}, {3, 6}, {4, 7}, {1, 7}, {2, 8}, {3, 9}, {4, 10}, {1, 10}, {2, 11}, {3, 12}, {4, 13}, {2.5, 7}}, Ticks -> {{1, 2, 3, 4}, None}, AxesStyle -> Thin, TicksStyle -> Directive[Black, Bold, 12], Mesh -> Full, Epilog -> { Line[ ...