# Problems running BEMPP on Mac

**URL:** <https://bempp.discourse.group/t/problems-running-bempp-on-mac/66>\
**Category:** Bempp\
**Created:** [19 February 2021 09:53 UTC](https://bempp.discourse.group/t/problems-running-bempp-on-mac/66 "2021-02-19T09:53:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebastianK](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SebastianK](https://bempp.discourse.group/u/SebastianK)\
**Post date:** [19 February 2021 09:53 UTC](https://bempp.discourse.group/t/problems-running-bempp-on-mac/66/1 "2021-02-19T09:53:55Z")

</div>

I am following the installation steps to install bempp 0.2.2 from source on my mac (Catalina 10.15.7).  
After installation I am getting the following error running sphere scattering example:

```auto
from bempp.api.linalg import gmres
neumann_fun, info = gmres(lhs, grid_fun, tol=1E-5)

```

~/audatic/bempp-cl/bempp/core/cl\_helpers.py in run(self, device\_interface, global\_size, local\_size, global\_offset, wait\_for, g\_times\_l, \*args)  
261 global\_offset=global\_offset,  
262 wait\_for=wait\_for,  
 → 263 g\_times\_l=g\_times\_l,  
264 )  
265

~/audatic/venv/lib/python3.7/site-packages/pyopencl/ **init**.py in kernel\_call(self, queue, global\_size, local\_size, \*args, \*\*kwargs)  
838 # **call** can’t be overridden directly, so we need this  
839 # trampoline hack.  
 → 840 return self.\_enqueue(self, queue, global\_size, local\_size, \*args, \*\*kwargs)  
841  
842 def kernel\_capture\_call(self, filename, queue, global\_size, local\_size,

in enqueue\_knl\_evaluate(self, queue, global\_size, local\_size, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, global\_offset, g\_times\_l, wait\_for)

LogicError: clEnqueueNDRangeKernel failed: INVALID\_WORK\_ITEM\_SIZE

I assume this is related to OpenCL but I am not quite sure how to fix it.  
Does anybody have experience with this problem?

---

<div class="post-metadata">

**Author:** ![timo](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/timo/32/7_2.png) [@timo](https://bempp.discourse.group/u/timo)\
**Post date:** [4 March 2021 16:44 UTC](https://bempp.discourse.group/t/problems-running-bempp-on-mac/66/2 "2021-03-04T16:44:39Z")

</div>

Hi. Apologies for the delayed reply. The OpenCL support under Mac is not very good. The CPU driver by Apple does not allow certain things, which are standard conform. On Mac the best way for performance is to use the Docker image. If you want to run natively then you can set the global option

bempp.api.DEFAULT\_DEVICE\_INTERFACE = ‘numba’

This activates the Numba fallback interface. But it is significantly slower than the OpenCL code.

---

<div class="post-metadata">

**Author:** ![andcic](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andcic](https://bempp.discourse.group/u/andcic)\
**Post date:** [23 May 2021 17:38 UTC](https://bempp.discourse.group/t/problems-running-bempp-on-mac/66/3 "2021-05-23T17:38:22Z")

</div>

Hi Timo,

I have tried the global option

bempp.api.DEFAULT\_DEVICE\_INTERFACE = ‘numba’

but still get the same error as SebastianK.

---

<div class="post-metadata">

**Author:** ![timo](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/timo/32/7_2.png) [@timo](https://bempp.discourse.group/u/timo)\
**Post date:** [23 May 2021 18:31 UTC](https://bempp.discourse.group/t/problems-running-bempp-on-mac/66/4 "2021-05-23T18:31:10Z")

</div>

Hi, I have no Mac to test this. My suggestion for serious use is to run the bempp-cl Docker image on Mac. Your performance can be significantly slower if you run Numba, depending on what kernel you use.
