Docker installation POCL error

Hi BEMPP team,
I’m trying to use BEMPP-CL for the first time. I used the docker installation, and ran the laplace_interior_dirichlet.ipynb notebook. Error message is pasted below. Machine Linux Mint 20.2. If I understand it correctly, docker provides a complete image, so I cannot fix this myself by upgrading POCL (for example) with Synaptic.
Andrew.

RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE

Build on <pyopencl.Device ‘pthread-AMD Ryzen 5 5600X 6-Core Processor’ on ‘Portable Computing Language’ at 0x22a4160>:

error: unknown target CPU ‘generic’

(options: -D NUMBER_OF_QUAD_POINTS=6 -D TEST=p0_discontinuous -D TRIAL=p1_discontinuous -D TRIAL_NUMBER_OF_ELEMENTS=3186 -D TEST_NUMBER_OF_ELEMENTS=3186 -D NUMBER_OF_TEST_SHAPE_FUNCTIONS=1 -D NUMBER_OF_TRIAL_SHAPE_FUNCTIONS=3 -D KERNEL_FUNCTION=laplace_double_layer -D VEC_LENGTH=4 -D VEC_STRING=vec4 -I /usr/local/lib/python3.9/dist-packages/Bempp_cl-0.2.4-py3.9.egg/bempp/core/sources/include -DPRECISION=1 -I /usr/lib/python3/dist-packages/pyopencl/cl)
(source saved as /tmp/tmpypi2b6rh.cl)

Hi, strange. I looked for the error message and just found a very old bug report about it for POCL that should have been fixed a long time ago. Unfortunately, I don’t have an AMD CPU for testing. My slight suspicion is that your CPU is too new for the POCL version we use in the Docker image. Our Docker file is based on Ubuntu 20.04, which appeared well before your CPU was released. My only suggestion right now is that you use conda to install a fresh environment for bempp-cl. The easiest way to do this is to install conda, enable conda-forge and then say conda install bempp-cl. However, by default it installs an older version of pocl. So you may then have to manually state conda update pocl.

Hi,

Not sure if it’s a related error, but I get the following when importing bempp.api via Python terminal:

Current thread 0x00007f3730f67740 (most recent call first):
  File "/usr/local/lib/python3.9/dist-packages/Bempp_cl-0.2.4-py3.9.egg/bempp/core/opencl_kernels.py", line 283 in find_cpu_driver
  File "/usr/local/lib/python3.9/dist-packages/Bempp_cl-0.2.4-py3.9.egg/bempp/api/__init__.py", line 276 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 855 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/root/shared/CODE-MODELS/AC_PHD_003 - BEM model of cuboid room/AC_PHD_003_admittance_freqdomain.py", line 2 in <module>
Segmentation fault

I am on Windows 10, CPU is Intel(R) Core™ i7-4790 CPU @ 3.60GHz, with latest Docker Image.
I have tried running the same Docker image on my Linux partition (same machine) and it works. Any thoughts?

Thanks.

Just noticed your post. Apologies for the late response. Are you still experiencing this error?

Hi,

I have pulled the latest bempp Docker image, but still experiencing the same error. Weirdly, bempp works fine within the FenicsX Docker image (in the same machine). Let me know if you need me to provide more detailed info.

Thanks,
Andrea

There’s a chance that this is related to the issue in Problems running BEMpp under Docker. Could you try running the numba-only docker image and see if that works.

Commands to pull and run Numba-only image:

docker pull bempp/cl-notebook-numba:latest
docker run -p 8888:8888 bempp/cl-notebook-numba