maweigert / spimagine

GPU accelerated volume rendering / processing in Python
BSD 3-Clause "New" or "Revised" License
117 stars 17 forks source link

Spimagine and CPU (Ubuntu 14.04) #1

Closed paulmueller closed 9 years ago

paulmueller commented 9 years ago

I am using spimaging to display numpy arrays. Everything works when a GPU is available.

This is the python code that I am using:

from spimagine import volshow, volfig
filename = "somenumpyfile.npy"

data = np.load(filename).real
fig=volfig(0) 
volshow(data) 

My laptop does not support OpenCL, so spimagine attempts to use the CPU:

could not open /home/paul/.spimagine
/home/paul/repos/paulm/programming/3Dvis/env_spimagine/local/lib/python2.7/site-packages/spimagine-0.1.1-py2.7.egg/spimagine/lib/czifile.py:123: UserWarning: failed to import the optional _czifile C extension module.
Decoding of JXR and JPG encoded images will be unavailable.
Czifile.pyx can be obtained at http://www.lfd.uci.edu/~gohlke/
  "failed to import the optional _czifile C extension module.\n"
No module named libtiff
could not import imgtools
clGetDeviceIDs failed: device not found
could not find GPU OpenCL device -  trying CPU...
INFO:PyOCL.OCLProcessor | using device: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
Stack dump:
0.  Running pass 'Intel OpenCL Vectorizer' on module 'Program'.
1.  Running pass 'Intel OpenCL VectorizerCore' on function '@__Vectorized_.iso_surface'
2.  Running pass 'PacketizeFunction' on function '@__Vectorized_.iso_surface'
Segmentation fault (core dumped)

Any hints?

paulmueller commented 9 years ago

Sorry, I used the old bitbucket repositories. I will let you know If the problem persists.

paulmueller commented 9 years ago

I am getting import errors now.

could not open /home/paul/.spimagine
/home/paul/repos/spimagine/env/local/lib/python2.7/site-packages/spimagine-0.1.1-py2.7.egg/spimagine/lib/czifile.py:123: UserWarning: failed to import the optional _czifile C extension module.
Decoding of JXR and JPG encoded images will be unavailable.
Czifile.pyx can be obtained at http://www.lfd.uci.edu/~gohlke/
  "failed to import the optional _czifile C extension module.\n"
No module named libtiff
could not import imgtools
Traceback (most recent call last):
  File "visualize_3dri_spimagine.py", line 28, in <module>
    from spimagine import volshow, volfig
  File "/home/paul/repos/spimagine/env/local/lib/python2.7/site-packages/spimagine-0.1.1-py2.7.egg/spimagine/__init__.py", line 124, in <module>
    from imgtools import denoise_filter2,denoise_filter3
ImportError: No module named imgtools

I assume I have a problem with library versions. Could you post your output of pip freeze please?

paulmueller commented 9 years ago

Progress:

I installed your imgtools with pip install --user git+http://mweigert@bitbucket.org/mweigert/imgtools and sktensor with pip install scikit-tensort. I am now missing the package rl_deconv.

paulmueller commented 9 years ago

The issue is solved by removing pylibtiff (responsible for the segmentation fault) and uncommenting these lines in __init__.py:

from rl_deconv import deconv_RL
from tv_deconv import deconv_tv3_gpu

Are you developing spimagine mainly here on github? I would like to create a pull-request for setup.py so that an installation on linux is more straight forward.

Cheers!

maweigert commented 9 years ago

Hey Paul,

Danke fuer das Feedback!

Auf Ubuntu ist das alles tatsaechlich ziemlich ungetested (allerdings laueft es auf unseren Ubuntu 14.04 Kisten)

1) Ich habe die deconvolution abhaengigkeit rausgeschmissen (das war nur fuer mich lokal und hat sich ins develop/master gemogelt), sollte jetzt klappen.

2) imgtools solltest du nicht installieren muessen - das brauchen nur die Image-Prozessoren (e.g. de/convolutions). Aber der Importerror wird eigentlich intern gefangen.

3) ich habe alles gepusht - nehm also gerne PR's an :)

Liebe Gruesse,

M

Am 24/06/2015 um 12:28 schrieb Paul Müller:

Progress:

I installed your imgtools with |pip install --user git+http://mweigert@bitbucket.org/mweigert/imgtools| and sktensor with |pip install scikit-tensort|. I am now missing the package |rl_deconv|.

— Reply to this email directly or view it on GitHub https://github.com/maweigert/spimagine/issues/1#issuecomment-114817726.

Martin Weigert PhD Student - Gene Myers Group Max Planck Institute of Molecular Cell Biology and Genetics Pfotenhauer Str. 108 01307 Dresden, Germany mail: mweigert@mpi-cbg.de