Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

unittest fail when CUDA device not available #59

Open
paskino opened this issue Jul 28, 2020 · 1 comment
Open

unittest fail when CUDA device not available #59

paskino opened this issue Jul 28, 2020 · 1 comment

Comments

@paskino
Copy link
Contributor

paskino commented Jul 28, 2020

The current method used to detect CUDA availability fails miserably

import astra
use_cuda = True
try:
    astra.test_CUDA()
except RuntimeError as re:
    print (re)
    use_cuda = False
except:
    print ("Crash!")
    use_cuda = False

The error is the following and is not properly handled in Python, I suppose

Error: CUDA error 35: CUDA driver version is insufficient for CUDA runtime version.
Error: Failed to allocate 32x2 GPU buffer
python: ./../../src/CudaForwardProjectionAlgorithm.cpp:276: virtual void astra::CCudaForwardProjectionAlgorithm::run(int): Assertion `ok' failed.
@paskino paskino changed the title unittest fail when CUDA not available unittest fail when CUDA device not available Jul 28, 2020
@gfardell
Copy link
Member

It looks like the cuda version that's been chosen with astra is higher than the drivers support. What happened? it didn't get caught as an exception?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants