-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: ffi_prep_cif_var failed when calling richardson_lucy_nc but not when calling richardson_lucy (python) #34
Comments
How big is your image? My first thought is that you might be running out of memory (the non-circulant version uses more memory). If you are running out of memory you could try the dask version. Here is an example as to how to use the dask version https://github.com/clij/clij2-fft/blob/master/python/tests/test_richardson_lucy_dask.py. If not a memory problem let me and I'll look into it further. |
Hi, Thanks very much for the quick response! Not so sure it is a memory issue, as I the test image is very small (14,500,500), psf (31,47,47) and the gpu's we run have 80G of memory. I also tried it with a small array of np.ones of dimension (100, 100, 24) with psf (24, 24, 12) with the same result. See log below:
|
Thanks for the additional feedback. I changed the interface to convcorr3d a few months ago and somehow did not update the Linux libs. I think I've fixed it, but let me know. Update clij2-fft, confirm that you have version 0.27 and try again. Once you get it going I'd be interested to hear if the non-circulant version makes a difference for your image. I noticed your PSF size in z is longer than the image size. Is that correct? The non-circulant version should be able to handle that, however I haven't done a lot of testing with that scenario. What type of instrument are you using and how did you create the PSF? |
Your images from circulant RL actually pretty good, so not sure the non-circulant version will help you much. That being said I'd still like to figure out why it isn't working for you. If you are able to post a sample of an image and one of your PSFs I can troubleshoot further. Either here or on ImageSC. |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/issues-with-python-version-of-clij2-richardson-lucy-nc/101300/1 |
Hi,
I am running into a runtime error during calling the non circular RL from python version, where it throws RuntimeError: ffi_prep_cif_var failed
The circular version richardson_lucy() does seem to work fine and produces quite good results. Any advice on if this could be a data issue (psf / data in wrong format) or a install issue would be appreciated as I'd like to test the nc version as I have some strong edges in my data.
I tried a bit of googling and looking at the source, and it seems like its an error between the python - C interaction but it goes a bit above my head.
Running on Ubuntu 22.04.4 with version python 3.10.0, clij2-fft 0.26, pyopencl 2024.2.7 and cuda 12.1 (full package list below).
EDIT:
I have tried running with np.ones to rule out an issue with my image / psfs following from: https://github.com/clij/clij2-fft/blob/master/python/interactive%20tests/test_richardson_lucy.py
It still gives the same issue
Package versions in my environment:
The text was updated successfully, but these errors were encountered: