Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I test OpenCL on GPU when logged in remotely on Mac?
    text
    copied!<p>My OpenCL program can find the GPU device when I am logged in at the console, but not when I am logged in remotely with ssh. Further, if I run the program as root in the ssh session, the program can find the GPU.</p> <p>The computer is a Snow Leopard Mac with a GeForce 9400 GPU.</p> <p>If I run the program (see below) from the console or as root, the output is as follows (notice the "GeForce 9400" line):</p> <pre><code>2 devices found Device #0 name = GeForce 9400 Device #1 name = Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz </code></pre> <p>but if it is just me, over ssh, there is no GeForce 9400 entry:</p> <pre><code>1 devices found Device #0 name = Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz </code></pre> <p>I would like to test my code on the GPU without having to be root. Is that possible? Simplified GPU finding program below:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;OpenCL/opencl.h&gt; int main(int argc, char** argv) { char dname[500]; size_t namesize; cl_device_id devices[10]; cl_uint num_devices; int d; clGetDeviceIDs(0, CL_DEVICE_TYPE_ALL, 10, devices, &amp;num_devices); printf("%d devices found\n", num_devices); for (d = 0; d &lt; num_devices; ++d) { clGetDeviceInfo(devices[d], CL_DEVICE_NAME, 500, dname, &amp;namesize); printf("Device #%d name = %s\n", d, dname); } return 0; } </code></pre> <p>EDIT: I found essentially the same question being asked on <a href="http://forums.nvidia.com/index.php?showtopic=156836&amp;pid=984665&amp;mode=threaded&amp;start=#entry984665" rel="nofollow noreferrer">nvidia's forums</a>. Unfortunately, the only answer was of the form "this is the wrong forum".</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload