Objet : Developers list for StarPU
Archives de la liste
- From: Samuel Thibault <samuel.thibault@inria.fr>
- To: Gabriel Piscoya Davila <gpiscoya2013@hotmail.com>
- Cc: "starpu-devel@lists.gforge.inria.fr" <starpu-devel@lists.gforge.inria.fr>
- Subject: Re: [Starpu-devel] Problem with Opencl and starpu
- Date: Mon, 7 Nov 2016 16:27:02 +0100
- List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
- List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
Hello,
Gabriel Piscoya Davila, on Sat 05 Nov 2016 00:38:02 +0000, wrote:
> Somebody knows what could be the problem ? I'm installing starpu via ssh in
> another machine(i dont know if this affect in something)
Could you try to build and run the attached program?
gcc version.c -o version -lOpenCL
./version
If it shows 0 platforms, the problem is not at the StarPU level, but the
OpenCL drivers, and we can't do much except advising to check the
documentation of your OpenCL implementation.
Samuel
#include <CL/cl.h>
#include <stdio.h>
#include <assert.h>
int main(void) {
cl_device_id did[16];
cl_int err;
cl_platform_id pid, pids[16];
cl_uint nbplat, nb;
cl_uint uint;
char buf[128];
size_t size;
int i, j;
err = clGetPlatformIDs(sizeof(pids)/sizeof(pids[0]), pids, &nbplat);
assert(err == CL_SUCCESS);
printf("%u platforms\n", nbplat);
for (j = 0; j < nbplat; j++) {
pid = pids[j];
printf("platform %d id %p\n", j, pid);
err = clGetPlatformInfo(pid, CL_PLATFORM_VERSION,
sizeof(buf)-1, buf, &size);
assert(err == CL_SUCCESS);
buf[size] = 0;
printf("platform version %s\n", buf);
err = clGetDeviceIDs(pid, CL_DEVICE_TYPE_ALL,
sizeof(did)/sizeof(did[0]), did, &nb);
assert(err == CL_SUCCESS);
printf("%d devices\n", nb);
for (i = 0; i < nb; i++) {
err = clGetDeviceInfo(did[i], CL_DEVICE_VERSION,
sizeof(buf)-1, buf, &size);
buf[size] = 0;
err = clGetDeviceInfo(did[i],
CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(uint), &uint, &size);
err = clGetDeviceInfo(did[i],
CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(uint), &uint, &size);
printf(" device %d version %s align
%u\n", i, buf, uint);
}
}
return 0;
}
- [Starpu-devel] Problem with Opencl and starpu, Gabriel Piscoya Davila, 05/11/2016
- Re: [Starpu-devel] Problem with Opencl and starpu, Samuel Thibault, 07/11/2016
Archives gérées par MHonArc 2.6.19+.