# Problems running the tutorials/examples

**URL:** <https://bempp.discourse.group/t/problems-running-the-tutorials-examples/60>\
**Category:** Uncategorized\
**Created:** [1 February 2021 07:08 UTC](https://bempp.discourse.group/t/problems-running-the-tutorials-examples/60 "2021-02-01T07:08:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DAWardle](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@DAWardle](https://bempp.discourse.group/u/DAWardle)\
**Post date:** [1 February 2021 07:08 UTC](https://bempp.discourse.group/t/problems-running-the-tutorials-examples/60/1 "2021-02-01T07:08:21Z")

</div>

Hi everyone.

I’m not sure if I have a bug or just need help, so I’m not sure if I should be posting on GitHub/issues or this discourse — apologies if I’m posting in the wrong place.

I want to solve an electromagnetic scattering problem. It’s a simple problem (one object, simple shape, low resolution OK, etc.). My only computer is an aging laptop running Windows 10 (64 bit). I’ve installed bempp-cl-0.2.2 and made a `bempp’ environment. I’ve listed the packages in the environment at the end of this post (exafmm is not included because I didn’t think it was essential and I couldn’t make it work!).

I’ve tried running your `Bistatic RCS generated by dielectric spheres’ tutorial/example. It runs to completion with no error messages but the graphs are blank and, when I dig deeper, I find sol[i].grid\_coefficients is almost entirely nan+nanj (for i=0,1,2,3).

So I go back to the very beginning:

`Solving your first problem with Bempp’ ([Solving your first problem with Bempp | Bempp](https://bempp.com/documentation/get_started.html)):  
Works fine.

Laplace:

`Solving a Laplace problem with Dirichlet boundary conditions’ ([Tutorials & example applications | Bempp](https://bempp.com/documentation/tutorials.html)):  
Works fine.

`Solving a mixed Neumann-Dirichlet problem’  
Works fine.

`Computing the capacity of a cube with a re-entrant corner’  
sol.grid\_coefficients does have numbers. I’m not sure if they’re correct because the final instruction fails with an error (pasted at the end of this post).

``Weakly imposing a Dirichlet boundary condition’  
This doesn’t work and it might all be OK because it gives the error message `No compatible FMM library found. Please install Exafmm from [github.com/exafmm/exafmm-t.’](http://github.com/exafmm/exafmm-t.') and, as noted above, I’ve not installed ExaFMM.

Helmholtz:

‘Scattering from a sphere using a combined direct formulation’  
As with ``Bistatic RCS generated by dielectric spheres’, it runs to completion with no error messages but the graph is blank and, when you dig, you find ‘info’ (which is supposed to be zero) is 5120 and neumann\_fun.grid\_coefficients is an array of 512 `nan+nanj’.

It seems the Laplace examples are working OK, but the Helmholtz and Maxwell are not. Could it be relevant that, in Laplace, the quantities are real, while in Helmholtz and Maxwell the quantities are complex? Maybe I’m missing some package that’s important for complex numbers? To be honest, I’m stuck and would really appreciate any help from anyone.

# packages in environment at C:\Users\dward\anaconda3\envs\bempp:  
#  
# Name Version Build Channel  
appdirs 1.4.4 pyh9f0ad1d\_0 conda-forge  
atomicwrites 1.4.0 pyh9f0ad1d\_0 conda-forge  
attrs 20.3.0 pyhd3deb0d\_0 conda-forge  
bempp-cl 0.2.2 pypi\_0 pypi  
bzip2 1.0.8 h8ffe710\_4 conda-forge  
ca-certificates 2020.12.5 h5b45459\_0 conda-forge  
cached-property 1.5.1 py\_0 conda-forge  
certifi 2020.12.5 py38haa244fe\_1 conda-forge  
cftime 1.3.0 py38h347fdf6\_0 conda-forge  
colorama 0.4.4 pyh9f0ad1d\_0 conda-forge  
curl 7.71.1 h4b64cdc\_8 conda-forge  
cycler 0.10.0 py\_2 conda-forge  
decorator 4.4.2 py\_0 conda-forge  
fontconfig 2.13.1 h8289fb6\_1003 conda-forge  
freetype 2.10.4 h546665d\_0 conda-forge  
gmsh 4.6.0 h8ea2318\_0 conda-forge  
h5py 3.1.0 nompi\_py38h022eade\_100 conda-forge  
hdf4 4.2.13 h0e5069d\_1004 conda-forge  
hdf5 1.10.6 nompi\_h5268f04\_1113 conda-forge  
icu 68.1 h0e60522\_0 conda-forge  
iniconfig 1.1.1 pyh9f0ad1d\_0 conda-forge  
intel-openmp 2020.3 h57928b3\_311 conda-forge  
jpeg 9d h8ffe710\_0 conda-forge  
khronos-opencl-icd-loader 2020.12.18 h8d14728\_0 conda-forge  
kiwisolver 1.3.1 py38hbd9d945\_1 conda-forge  
krb5 1.17.2 hbae68bd\_0 conda-forge  
libblas 3.9.0 4\_mkl conda-forge  
libcblas 3.9.0 4\_mkl conda-forge  
libclang 11.0.1 default\_h5c34c98\_1 conda-forge  
libcurl 7.71.1 h4b64cdc\_8 conda-forge  
libiconv 1.16 he774522\_0 conda-forge  
liblapack 3.9.0 4\_mkl conda-forge  
libnetcdf 4.7.4 nompi\_h3a9aa94\_107 conda-forge  
libpng 1.6.37 h1d00b33\_2 conda-forge  
libssh2 1.9.0 hb06d900\_5 conda-forge  
libtiff 4.2.0 hc10be44\_0 conda-forge  
libxml2 2.9.10 hf5bbc77\_3 conda-forge  
llvmlite 0.35.0 py38h57a6900\_0 conda-forge  
lz4-c 1.9.3 h8ffe710\_0 conda-forge  
m2w64-gcc-libgfortran 5.3.0 6 conda-forge  
m2w64-gcc-libs 5.3.0 7 conda-forge  
m2w64-gcc-libs-core 5.3.0 7 conda-forge  
m2w64-gmp 6.1.0 2 conda-forge  
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge  
mako 1.1.3 pyh9f0ad1d\_0 conda-forge  
markupsafe 1.1.1 py38hab1e662\_2 conda-forge  
matplotlib 3.3.4 py38haa244fe\_0 conda-forge  
matplotlib-base 3.3.4 py38h34ddff4\_0 conda-forge  
meshio 4.3.8 pyhd8ed1ab\_0 conda-forge  
mkl 2020.4 hb70f87d\_311 conda-forge  
more-itertools 8.6.0 pyhd8ed1ab\_0 conda-forge  
msys2-conda-epoch 20160418 1 conda-forge  
netcdf4 1.5.5.1 nompi\_py38h5338a22\_100 conda-forge  
numba 0.52.0 py38h4c96930\_0 conda-forge  
numpy 1.19.4 py38h0cc643e\_1 conda-forge  
occt 7.4.0 h823b557\_3 conda-forge  
olefile 0.46 pyh9f0ad1d\_1 conda-forge  
openssl 1.1.1i h8ffe710\_0 conda-forge  
packaging 20.8 pyhd3deb0d\_0 conda-forge  
pillow 8.1.0 py38hf7ce48b\_1 conda-forge  
pip 20.3.3 pyhd8ed1ab\_0 conda-forge  
plotly 4.14.1 pyhd3deb0d\_0 conda-forge  
pluggy 0.13.1 py38h9bdc248\_3 conda-forge  
py 1.10.0 pyhd3deb0d\_0 conda-forge  
pyopencl 2020.3.1 py38h3867ce7\_0 conda-forge  
pyparsing 2.4.7 pyh9f0ad1d\_0 conda-forge  
pyqt 5.12.3 py38haa244fe\_7 conda-forge  
pyqt-impl 5.12.3 py38h885f38d\_7 conda-forge  
pyqt5-sip 4.19.18 py38h885f38d\_7 conda-forge  
pyqtchart 5.12 py38h885f38d\_7 conda-forge  
pyqtwebengine 5.12.1 py38h885f38d\_7 conda-forge  
pyreadline 2.1 py38h32f6830\_1002 conda-forge  
pytest 6.2.1 py38haa244fe\_0 conda-forge  
python 3.8.6 h7840368\_4\_cpython conda-forge  
python-dateutil 2.8.1 py\_0 conda-forge  
python\_abi 3.8 1\_cp38 conda-forge  
pytools 2020.4.4 pyhd3deb0d\_0 conda-forge  
qt 5.12.9 h5909a2a\_3 conda-forge  
retrying 1.3.3 py\_2 conda-forge  
scipy 1.6.0 py38h5f893b4\_0 conda-forge  
setuptools 49.6.0 py38h9bdc248\_2 conda-forge  
six 1.15.0 pyh9f0ad1d\_0 conda-forge  
sqlite 3.34.0 h8ffe710\_0 conda-forge  
tbb 2020.2 h2d74725\_1 conda-forge  
tk 8.6.10 h8ffe710\_1 conda-forge  
toml 0.10.2 pyhd8ed1ab\_0 conda-forge  
tornado 6.1 py38h294d835\_1 conda-forge  
vc 14.2 hb210afc\_2 conda-forge  
vs2015\_runtime 14.28.29325 h5e1d092\_0 conda-forge  
wheel 0.36.2 pyhd3deb0d\_0 conda-forge  
wincertstore 0.2 py38h32f6830\_1005 conda-forge  
xz 5.2.5 h62dcd97\_1 conda-forge  
zlib 1.2.11 h62dcd97\_1010 conda-forge  
zstd 1.4.8 h4e2f164\_1 conda-forge

Error in `Computing the capacity of a cube with a re-entrant corner’:

\>\>\> normalized\_capacity = 1./ ( 4 \* np.pi) \* sol.integrate()[0]  
Traceback (most recent call last):  
File “”, line 1, in   
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\bempp\_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid\_function.py”, line 560, in integrate  
return \_integrate(  
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\numba\core\dispatcher.py”, line 414, in \_compile\_for\_args  
error\_rewrite(e, ‘typing’)  
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\numba\core\dispatcher.py”, line 357, in error\_rewrite  
raise e.with\_traceback(None)  
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)  
←[1m←[1mnon-precise type pyobject←[0m  
←[0m←[1mDuring: typing of argument at C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\bempp\_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid\_function.py (729)←[0m  
←[1m  
File “…\anaconda3\envs\bempp\lib\site-packages\bempp\_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid\_function.py”, line 729:←[0m  
←[1mdef \_integrate(  
  
“”“Integrate a grid function over a grid.”""  
←[1m result = \_np.zeros(codomain\_dimension, dtype=coefficients.dtype)  
←[0m ←[1m^←[0m←[0m

This error may have been caused by the following argument(s):

- argument 1: ←[1mCannot determine Numba type of \<class ‘method’\>←[0m
