Hello all,
I have a large (~500 MB) lookup table loaded as a numpy array for an embarrassingly parallel transport calculation. This is too large for constant memory, but I can load it into global memory, permitting all threads access to any element required. However each thread must grab a set of 4 float values at every transport step. I eventually want to move to accessing 9 such sets (36 floats) at each step to do some table interpolation. Are there any good PyOpenCL examples putting such a read-only table into image memory? I’m not sure how much performance gain moving to image mem there would be anyways. Anyone have a suggestion? Thanks,
Zig
==========================
Zigfried Hampel-Arias
Physics PhD
BAEF Postdoctoral Fellow IIHE
zhampel(a)wipac.wisc.edu <mailto:zhampel@wipac.wisc.edu>
Christian Hacker <christian.b.hacker(a)gmail.com> writes:
> Used your recommendations on how to install OpenCL
> <https://wiki.tiker.net/OpenCLHowTo> and compile PyOpenCL from source
> <https://wiki.tiker.net/PyOpenCL/Installation/Linux> in a Python3.5
> virtualenv, using the reference ICD loader ocl-icd-libopencl1, nvidia ICD
> nvidia-opencl-icd-387, and opencl-headers packages. I get this error during
> the first compiler reference to OpenCL:
You're missing the dev package:
ocl-icd-opencl-dev
(Note: not ocl-icd-dev, although that doesn't hurt)
Andreas
Used your recommendations on how to install OpenCL
<https://wiki.tiker.net/OpenCLHowTo> and compile PyOpenCL from source
<https://wiki.tiker.net/PyOpenCL/Installation/Linux> in a Python3.5
virtualenv, using the reference ICD loader ocl-icd-libopencl1, nvidia ICD
nvidia-opencl-icd-387, and opencl-headers packages. I get this error during
the first compiler reference to OpenCL:
x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -O3 -DNDEBUG -g
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -fPIC -DPYOPENCL_USE_SHIPPED_EXT=1
-DPYGPU_PACKAGE=pyopencl -DPYGPU_PYOPENCL=1 -I/usr/include -Isrc/c_wrapper/
-I/usr/include/python3.5m
-I/home/christianhacker/.virtualenvs/tdc/include/python3.5m
-c src/c_wrapper/debug.cpp -o build/temp.linux-x86_64-3.5/src/c_wrapper/debug.o
-std=gnu++11 x86_64-linux-gnu-g++ -pthread -shared -Wl,-Bsymbolic-functions
-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro
-g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2
build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/pyopencl._cffi.o
build/temp.linux-x86_64-3.5/src/c_wrapper/wrap_cl.o
build/temp.linux-x86_64-3.5/src/c_wrapper/wrap_constants.o
build/temp.linux-x86_64-3.5/src/c_wrapper/bitlog.o
build/temp.linux-x86_64-3.5/src/c_wrapper/pyhelper.o
build/temp.linux-x86_64-3.5/src/c_wrapper/platform.o
build/temp.linux-x86_64-3.5/src/c_wrapper/device.o
build/temp.linux-x86_64-3.5/src/c_wrapper/context.o
build/temp.linux-x86_64-3.5/src/c_wrapper/command_queue.o
build/temp.linux-x86_64-3.5/src/c_wrapper/event.o
build/temp.linux-x86_64-3.5/src/c_wrapper/memory_object.o
build/temp.linux-x86_64-3.5/src/c_wrapper/svm.o
build/temp.linux-x86_64-3.5/src/c_wrapper/image.o
build/temp.linux-x86_64-3.5/src/c_wrapper/gl_obj.o
build/temp.linux-x86_64-3.5/src/c_wrapper/memory_map.o
build/temp.linux-x86_64-3.5/src/c_wrapper/buffer.o
build/temp.linux-x86_64-3.5/src/c_wrapper/sampler.o
build/temp.linux-x86_64-3.5/src/c_wrapper/program.o
build/temp.linux-x86_64-3.5/src/c_wrapper/kernel.o
build/temp.linux-x86_64-3.5/src/c_wrapper/debug.o
-L/usr/lib/i386-linux-gnu/ -lOpenCL -o build/lib.linux-x86_64-3.5/pyopencl/_
cffi.abi3.so -Wl,--no-as-needed
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 1
I know my system knows that the library's there: I confirmed that the
proper entries are in /etc/ld.so.conf.d/,
and running locate libOpenCL returns
/usr/lib/i386-linux-gnu/libOpenCL.so.1
/usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
/usr/share/doc/ocl-icd-libopencl1/html/libOpenCL.html
/usr/share/man/man7/libOpenCL.7.gz /usr/share/man/man7/libOpenCL.so.7.gz
I tried specifying python configure.py --cl-inc-dir=/usr/include
--cl-lib-dir=/usr/lib/i386-linux-gnu/ as well as python configure.py
--cl-inc-dir=/usr/include --cl-lib-dir=/usr/lib/x86_64-linux-gnu/, no dice.
Also tried setting LD_LIBRARY_PATH, didn't work. Any ideas?
--
CH