Problems running BEMpp under Docker

Hi everyone.

I pulled the Docker image of BEMpp yesterday on a computer at work using:
docker pull bempp/cl-notebook:latest
The pull seemed to complete OK without errors.

I then was able to get a JupyterLab notebook running using:
docker run -p 8888:8888 bempp/cl-notebook

In the JupyterLab notebook:
import numpy as np
A=np.array([[1,2],[3,4]])
… works fine because if I then enter:
A
… it parrots back that A is the array [[1,2],[3,4]].

But if I then enter:
import bempp.api
… there is a pause and then a pop-up window appears with a message along the lines:
Kernal Restarting: The kernal for Untitled.ipynb appears to have died. It will restart automatically.
… and if I then enter in the JupyterLab notebook:
bempp.api.enable_console_logging()
… I get an error message that the name `bempp’ is not defined.

Today I have repeated all these steps (starting with the Docker pull) on a different computer at home and I get exactly the same results.

Are you able to test the Docker image? Does it work OK or do you have the same problem as me?

Any relevant information would be greatly appreciated.

Yours sincerely,

David Wardle.

Hi David,

I’ve just tried running the docker image (on my Ubuntu 20.04 PC) and it works fine for me. What OS are you using?

Hi Matthew.

Thanks very much for your quick reply.

Both computers are Windows 10. Both are reasonably old laptops. One
has an Intel i5 CPU and the other an Intel i7.

Yours sincerely,

David Wardle.

Hi,

do your laptops already support AVX/AVX2? We had it a while ago that somebody tried to run it on a computer without AVX2, which leads to all kinds of strange crashes.

Hi Timo.

Thanks for your support.

You might be right. The computer at work has an i5 560m which does
not appear to have AVX of any description
(Intel® Core™ i5-560M Processor (3M Cache, 2.66 GHz)).
The computer at home has an i7 2670qm which appears to have AVX but
not AVX2 (Intel® Core™ i7-2670QM Processor (6M Cache, up to 3.10 GHz)).

If your CPU needs AVX2 to reliably run BEMpp under Docker, maybe you
could flag this on your page:

— I’d just assumed that, if I met the requirements to run Docker
(which I do) I could run BEMpp under Docker (which perhaps is not
necessarily the case).

Yours sincerely,

David Wardle.

We provide Numba as a backup option for users who cannot use opencl, so it would make sense to provide a backup docker image without opencl that can still use Numba. I think this image is likely to work for you.

I’ve opened an issue on GitHub for this and assigned it to me: Provide Docker image without opencl · Issue #134 · bempp/bempp-cl · GitHub

I should have time in the next week to create this new Docker image in the next week. I’ll update the installation instructions and post here once it exists.

Hi Matthew.

Thank you. If you make the image (no rush) I’ll give it a try and let
you know how I get on.

Yours sincerely,

David Wardle.

I’ve created the new docker image. You should be able to download an run it using:

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

Let me know if this works then I’ll update the installation instructions accordingly

Hi Matthew.

Using the new Docker image I have successfully run all of the steps in
the tutorial `Bistatic RCS generated by dielectric spheres’
(Jupyter Notebook Viewer)
on my computer at home. I got no errors and the graphs reproduced
correctly.

I am going into work over the next few days, and, if time permits,
I’ll try the image on the work laptop. I’ll let you know how I get
on.

Many thanks for your help with this — by making tools like Bempp
available to essentially anyone, you are truly helping to make the
world a better place.

Yours sincerely,

David Wardle.

1 Like

Hi again Matthew.

I have now repeated the procedure from yesterday (outlined immediately
below) on the work laptop. This is the machine with CPU that does not
have any form of AVX. I get the same results as yesterday i.e. the
tutorial seems to work fine.

Thanks again.

David Wardle.

1 Like

Thanks. Now that we’ve confirmed it works, information about the alternative docker image is on the website at Installing Bempp | Bempp