Andreas,
Thank you very much for your quick reply! I will try building it from source with that
flag and see if I have success with this method. One clarification I should have made:
when I was receiving the error I outlined below, it was from installing PyOpenCL using
"conda install pyopencl-2018.2.5-py37h8619c78_0.tar.bz2" as opposed to building
it from source. Is there a way I can add a similar flag while doing "conda
install" or do you think building it from source with that added flag is my best
option?
Chris
-----Original Message-----
From: Andreas Kloeckner <lists(a)informa.tiker.net>
Sent: Monday, April 1, 2019 8:18 PM
To: DITTER, CHRISTOPHER J 1st Lt USAF HAF NASIC/ACNW
<christopher.ditter.1(a)us.af.mil>il>; pyopencl(a)tiker.net
Subject: [Non-DoD Source] Re: [PyOpenCL] PyOpenCL Installation
Chris,
"DITTER, CHRISTOPHER J 1st Lt USAF HAF NASIC/ACNW"
<christopher.ditter.1(a)us.af.mil> writes:
I am a new user trying to install PyOpenCL with the
latest version of
Anaconda (for python 3.7) to a standalone HPC. After installing
Anaconda to my work directory, installing the correct PyOpenCL package
for python 3.7, symbolically linking the nvidia.icd from
/etc/OpenCL/vendors/nvidia.icd to
/p/work1/myUsername/myAnaconda3/etc/OpenCL/vendors/nvidia.icd as the
documentation states, launching an interactive GPU node, launching
python, and running “import pyopencl”, I get the following error:
“ImportError: /lib64/libOpenCL.so.1: version ‘OPENCL_2.1’ not found
(required by /p/work1/
myUsername/myAnaconda3/lib/python3.7/pyopencl/_cl.cpython-37m-x86_64-l
inux-gnu.so”. The file /etc/OpenCL/vendors/nvidia.icd contains the
text “libnvidia-opencl.so.1”.
I originally submitted a ticket to the HPC admins asking them to
update OpenCL to version 2.1 due to this error I was getting, but
later learned that the GPU’s on this HPC only support up to OpenCL
1.2. After looking over some posts here, I’m tempted to think that
there may be an issue with the OpenCL header files specifying that the
OpenCL version is 2.1 even though the nvidia drivers only support
OpenCL 1.2. Does this sound like a good path for me to pursue with the
admins or do you have any other suggestions for this error? Thanks!
Your initial hunch was correct. Nonetheless, if you must build PyOpenCL from source, you
should be able to use
./configure.py --cl-pretend-version=1.2
to force the version of the header that PyOpenCL uses.
Alternatively, since (it seems) you are already using Anaconda, you might as well install
our binary packages in conda-forge, see here:
https://documen.tician.de/pyopencl/misc.html#installation
(if that's an option)
HTH,
Andreas