{"id":2860,"date":"2010-09-13T21:26:29","date_gmt":"2010-09-13T20:26:29","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=2860"},"modified":"2010-09-16T14:14:21","modified_gmt":"2010-09-16T13:14:21","slug":"a-sadly-brief-look-at-gp-gpu-computing-in-matlab-2010b","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=2860","title":{"rendered":"A (sadly) brief look at GP GPU Computing in MATLAB 2010b"},"content":{"rendered":"<p>One of the new features in <a href=\"http:\/\/www.mathworks.com\/\">MATLAB 2010b<\/a> that&#8217;s getting me very excited is the <a href=\"http:\/\/en.wikipedia.org\/wiki\/CUDA\">CUDA<\/a> based GP-GPU (General Purpose computation on Graphical Processing Units) integration that&#8217;s become available in the Parallel Computing Toolbox.  As soon as I had MATLAB 2010b installed on my CUDA capable laptop (Dell XPS M1330 with a GeForce 8400M GS) running Ubuntu I wanted to try out as much of this new functionality as my low-end hardware would allow me.  I&#8217;ve <a href=\"https:\/\/www.walkingrandomly.com\/?p=468\">installed and played with\u00a0CUDA<\/a> on this machine in the past and so I fired up MATLAB 2010b and issued the following command to ask MATLAB how many CUDA enabled devices it thought I had on my system<\/p>\n<pre>gpuDeviceCount\r\n\r\n??? Error using ==&gt; feval\r\nThe CUDA driver was found, but it is too old. The CUDA driver on your system is version: 3.\r\nThe required CUDA version is: 3.1 or greater.<\/pre>\n<p>The practical upshot of the above error message is that I needed to upgrade my NVidia graphics driver which was at version 195.36.24.\u00a0 I went for the latest version which, at the time of writing, is version\u00a0256.53.\u00a0 I did this from the <strong>NVIDIA-Linux-x86-256.53.run<\/strong> file which I got direct from NVidia and all I&#8217;ll say about the process is that it ruined an otherwise perfectly good Sunday morning.\u00a0 I did get there in the end though!<\/p>\n<p>So, I had the shiniest version of the graphics driver up and running.\u00a0 Time to fire up MATLAB again:<\/p>\n<pre>&gt;&gt; gpuDeviceCount\r\nWarning: The device selected (device 1, \"GeForce 8400M\r\nGS\") does not have sufficient compute capability to be\r\nused. Compute capability 1.3 (or greater) is required,\r\nthe selected device has compute capability 1.1.\r\n&gt; In deviceCount at 7\r\n  In GPUDevice.GPUDevice&gt;GPUDevice.count at 27\r\n  In gpuDeviceCount at 10<\/pre>\n<p>Or, to put it another way, &#8220;<strong>Please insert new laptop to continue.<\/strong>&#8221;  With that, my MATLAB\/CUDA experiments are brought to an end.<\/p>\n<p>Can anyone recommend a reasonably priced laptop that contains a CUDA capable graphics card at compute level 1.3 or above?<\/p>\n<p><strong>Update (16th September 2010): <\/strong>Several people have emailed me to defend The Mathwork&#8217;s design decision so I&#8217;d like to make something very clear: I completely agree with The Matworks in their insistence on CUDA compute level 1.3 or above.\u00a0 As one correspondent pointed out, this ensures that not only does the hardware support double precision but it is also IEEE-compliant and IEEE-compliance is a good thing!\u00a0 This blog post was never meant to criticize The Mathworks over this, I wrote it partly to ensure that more people are aware of the requirements and partly because I needed to vent over the sudden obsolescence of my relatively new laptop.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new features in MATLAB 2010b that&#8217;s getting me very excited is the CUDA based GP-GPU (General Purpose computation on Graphical Processing Units) integration that&#8217;s become available in the Parallel Computing Toolbox. As soon as I had MATLAB 2010b installed on my CUDA capable laptop (Dell XPS M1330 with a GeForce 8400M GS) [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[44,11],"tags":[],"class_list":["post-2860","post","type-post","status-publish","format-standard","hentry","category-cuda","category-matlab"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-K8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2860"}],"version-history":[{"count":6,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2860\/revisions"}],"predecessor-version":[{"id":2882,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2860\/revisions\/2882"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}