Fatal python error: Segmentation fault in bempp-cl

46 views
Skip to first unread message

Emanuele

unread,
Jun 4, 2020, 10:39:21 AM6/4/20
to bempp
Hello Bempp team,

I have successfully installed the new Bempp-cl on macOS High Sierra (v 10.13.6) via conda by using the new build under github.com/bempp/bempp-cl.

However, I quickly ran into a problem in solving your first Laplace problem available on http://bempp.com/documentation/get_started.html : I get a "Segmentation fault" in python and my process crash. I can't figure out the source of that error, but if this can help you, I tried to get a detailed traceback (by enabling the Python "faulthandler" module) which reads as follows :

Fatal Python error: Segmentation fault

Current thread 0x00007fff90e59380 (most recent call first):
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/__init__.py", line 718 in program_build
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/cache.py", line 398 in _create_built_program_from_source_cached
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/cache.py", line 476 in create_built_program_from_source_cached
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/__init__.py", line 519 in <lambda>
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/__init__.py", line 539 in _build_and_catch_errors
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/pyopencl/__init__.py", line 518 in build
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/core/cl_helpers.py", line 207 in _build
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/core/cl_helpers.py", line 194 in __init__
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/core/dense_assembler.py", line 127 in assemble_dense
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/helpers.py", line 22 in timed_fun
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/core/dense_assembler.py", line 34 in assemble
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/api/assembly/assembler.py", line 74 in assemble
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/api/assembly/boundary_operator.py", line 136 in _assemble
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/api/assembly/boundary_operator.py", line 40 in weak_form
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/api/linalg/iterative_solvers.py", line 195 in _gmres_single_op_imp
  File "/usr/local/anaconda3/envs/bempp/lib/python3.8/site-packages/bempp/api/linalg/iterative_solvers.py", line 68 in gmres
  File "my1sttest_bempp.py", line 36 in <module>
[1]    8495 segmentation fault  python -X faulthandler my1sttest_bempp.py

 Does anyone have any idea on how this error can be fixed?

Thank you very much!

 

Timo Betcke

unread,
Jun 4, 2020, 4:09:23 PM6/4/20
to bempp
Hi,

the problem is not in Bempp but in the POCL OpenCL driver, which produces crashes on Mac OS. With the current release version the only way is to run Bempp within a Docker image on Mac.
The new development version of Bempp has alternative implementations (based on Numba) of all computational routines  that do not require OpenCL. However, these are slower than the OpenCL versions.

The development version will still be a couple of weeks until release. We have significantly improved all core routines and FMM support is also built in. If you are happy to try it, let me know and I will give you
instructions on how to install it on Mac. But be warned. There are still a few rough edges.

Best wishes

Timo

EmaNuele

unread,
Jun 4, 2020, 5:23:51 PM6/4/20
to bempp
Hi Timo,

Thank you for your prompt reply. I see what you mean about OpenCL compatibility and thanks for saving me from other tedious debugging/traceback tasks.
I would be glad to try the new development version based on the Numba implementation. Please feel free to instruct me on how to installat it on Mac.

In addition, can you provide me with precise informations about the username and password needed to activate the Bem++ repository as part of the Homebrew-based installation on Mac as well (please refer to http://www.bempp.org/installation.html for more details) ?

Kind regards,
Emanuele
Reply all
Reply to author
Forward
0 new messages