Incorrect act OpenCl/C++ script on CPU and GPU -
i have transfered opencl/c++ script new machine (intel(r) core(tm) i5-4570 cpu @ 3.20ghz, nvidia tesla c2070).
i ran on gpu , got correct results (here when tried run on cpu gave me incorrect results 0), wanted run on cpu installed intel driver (http://wiki.tiker.net/openclhowto).
when compiled faced problem:
inconsistency detected ld.so: dl-version.c: 224: _dl_check_map_versions: assertion `needed != ((void *)0)' failed!
i worked around putting -lglut -lglu -lgl -lm -lpthread parameters g++.
the problem gives me correct results when put cl_device_type_cpu , wrong results (0 looks not work) when put cl_device_type_gpu.
expected output:
315360000 0.345 0.349 0.345 9
wrong output:
315360000 0 0 0 9
any idea!!
solved :) made modifications depending on code in link https://devtalk.nvidia.com/default/topic/498968/printing-all-opencl-devices-not-detecting-all-opencl-devices-under-windows/
cl_int ret = clgetplatformids(2, platforms, &ret_num_platforms); cout << ret; //ret = clgetdeviceids( platforms[0], cl_device_type_cpu, 1, &device_id, &ret_num_devices); // execute me on cpu ret = clgetdeviceids( platforms[1], cl_device_type_gpu, 1, &device_id, &ret_num_devices); // execute me on gpu
Comments
Post a Comment