jleuschn/dival

'astra_cuda' back-end not available

Closed this issue ยท 3 comments

Hi,

I wanted to use dival to get access to your standard datasets (ellipses and lodopab).

I installed divial via pip install dival.

Then I executed the following lines:

import dival
ellipses = dival.get_standard_dataset('ellipses')

And got this error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-6beeed4e0fd9> in <module>
----> 1 ellipses = dival.get_standard_dataset('ellipses')

~/Programs/miniconda3/envs/pI/lib/python3.7/site-packages/dival/datasets/standard.py in get_standard_dataset(name, **kwargs)
    130 
    131         impl = kwargs.pop('impl', 'astra_cuda')
--> 132         ray_trafo = odl.tomo.RayTransform(space, geometry, impl=impl)
    133 
    134         def get_reco_ray_trafo(**kwargs):

~/Programs/miniconda3/envs/pI/lib/python3.7/site-packages/odl/tomo/operators/ray_trafo.py in __init__(self, domain, geometry, **kwargs)
    381         super(RayTransform, self).__init__(
    382             reco_space=domain, proj_space=range, geometry=geometry,
--> 383             variant='forward', **kwargs)
    384 
    385     def _call_real(self, x_real, out_real):

~/Programs/miniconda3/envs/pI/lib/python3.7/site-packages/odl/tomo/operators/ray_trafo.py in __init__(self, reco_space, geometry, variant, **kwargs)
    150                 raise ValueError('`impl` {!r} not understood'.format(impl_in))
    151             if impl not in _AVAILABLE_IMPLS:
--> 152                 raise ValueError('{!r} back-end not available'.format(impl))
    153 
    154         # Cache for input/output arrays of transforms

ValueError: 'astra_cuda' back-end not available

Would you recommend to download the data via zenodo instead?

Cheers

Hi,

the error is about the backend implementation for the radon transform. The default is 'astra_cuda', which requires both the astra-toolbox being installed and a cuda-enabled GPU. For testing, you can pass the option impl='skimage' to get_standard_dataset. But for real use, this will probably be too slow.If you are using anaconda, the latest development version of astra can be installed with

conda install astra-toolbox -c astra-toolbox/label/dev

Then the backends 'astra_cpu' and 'astra_cuda' should become available ('astra_cuda' only if cuda is available).

As for downloading the data, it should not be related to this issue. The automated download using dival usually works, however users have reported robustness issues, which may occur especially if the network connection to the zenodo.org servers is weak.

Best regards,
Johannes

Thank you. Works with the additional option.

Personally it would have helped me if your answer would be part of the README.md.

Looking forward to play around with the datasets!

Great, thanks for the feedback, will add it to the README!