ufo-kit / tofu

Helper scripts for tomographic reconstruction using the ufo-core framework
GNU Lesser General Public License v3.0
18 stars 9 forks source link

tofu flow: seg fault #129

Open farhi opened 1 year ago

farhi commented 1 year ago

Running ufo tofu 0.12.0 in a Debian Bookworm, I get the output (nothing else):

$ tofu flow
segmentation fault

If I extract the last dmesg entry I have:

[4327648.778295] traps: tofu[802486] general protection fault ip:7f6becedf864 sp:7fff8303d5d8 error:0 in libOpenCL.so.1.0.0[7f6becedc000+6000]
tfarago commented 1 year ago

Please run it with --verbose and also let me know what are the package versions on your system, the ones relevant for flow are in requirements-flow.txt. What is your Python version? Do other tofu commands work?

farhi commented 1 year ago

Here is the --verbose output:

$ tofu flow --verbose
DEBUG: General
DEBUG:   config           reco.conf
DEBUG:   log              -
DEBUG:   output           result-%05i.tif
DEBUG:   output_append    False
DEBUG:   output_bitdepth  32
DEBUG:   output_bytes_per_file 137438953472
DEBUG:   output_maximum   -
DEBUG:   output_minimum   -
DEBUG:   verbose          True
DEBUG:   width            -
DEBUG: Input
DEBUG:   bitdepth         32
DEBUG:   height           -
DEBUG:   number           -
DEBUG:   resize           -
DEBUG:   retries          0
DEBUG:   retry_timeout    0
DEBUG:   start            0
DEBUG:   step             1
DEBUG:   y                0
DEBUG:   y_step           1
Erreur de segmentation

Here are the installed packages:

Name: PyGObject
Version: 3.42.2
Summary: Python bindings for GObject Introspection
Home-page: https://pygobject.readthedocs.io
Author: James Henstridge
Author-email: james@daa.com.au
License: GNU LGPL
Location: /usr/lib/python3/dist-packages
Requires: pycairo
Required-by: 

Name: imageio
Version: 2.4.1
Summary: Library for reading and writing a wide range of image, video, scientific, and volumetric data formats.
Home-page: http://imageio.github.io/
Author: imageio contributors
Author-email: almar.klein@gmail.com
License: (new) BSD
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by:

Name: numpy
Version: 1.24.2
Summary: Fundamental package for array computing in Python
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: 
License: BSD-3-Clause
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: asdf, asdf-astropy, Cartopy, cftime, cmyt, contourpy, galpy, Glymur, h5py.-debian-h5py-serial, lmfir

Name: networkx
Version: 2.8.8
Summary: Python package for creating and manipulating graphs and networks
Home-page: https://networkx.org/
Author: Aric Hagberg
Author-email: hagberg@lanl.gov
License: 
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: pymatgen

Name: PyQt5
Version: 5.15.9
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: info@riverbankcomputing.com
License: GPL v3
Location: /usr/lib/python3/dist-packages
Requires: PyQt5-sip
Required-by: PyQtWebEngine, QScintilla

Name: pyqtconsole
Version: 1.2.2
Summary: Light weight python interpreter, easy to embed into Qt applications
Home-page: https://github.com/marcus-oscarsson/pyqtconsole
Author: Marcus Oskarsson
Author-email: marcus.oscarsson@esrf.fr
License: MIT
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: 

Name: pyxdg
Version: 0.28
Summary: PyXDG contains implementations of freedesktop.org standards in python.
Home-page: http://freedesktop.org/wiki/Software/pyxdg
Author: 
Author-email: 
License: 
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: 

Name: qtpynodeeditor
Version: 0+unknown
Summary: Python Qt node editor
Home-page: https://github.com/klauer/qtpynodeeditor
Author: Ken Lauer
Author-email: 
License: BSD
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: 
tfarago commented 1 year ago

Sorry it takes this long, next week I should have more time to look into it.

tfarago commented 1 year ago

How did you install OpenCL, do you have an NVIDIA GPU and it came with Cuda, or do you use something else?

farhi commented 1 year ago

Hi Tomas, We indeed have GPU servers with CUDA and the relevant NVIDIA OpenCL ICD.

However, I just tested on a system without any CUDA stuff (no dedicated GPU). This is a Ubuntu 22.04 with PoCL and MesaCL ICD. The dmesg last message brings:

farhi commented 1 year ago

The tofu ez commands works nicely.

tfarago commented 1 year ago

The tofu ez commands works nicely.

and it actually produces some reconstruction? How about this one?:

ufo-launch dummy-data width=1024 height=1024 number=100 ! fft ! filter ! ifft ! backproject ! null

It's strange because the error comes from OpenCL, so it strictly speaking has nothing to do with flow.

farhi commented 1 year ago

Hi Tomas,

you are right, the ufo-launch commands works. So the error originates from outside tofu. I'm going to investigate further.