Open benediktbrandt opened 4 years ago
thanks for pointing it out. Do you have by any chance a thought how to solve it? @benediktbrandt I'm not an expert on PyCUDA and I believe we should move it to Python 3 anyhow. Could you please check that when you select Google Runtime - Python 3 -
If I change the runtime to python3 in colab I get this error:
ImportError: /usr/local/lib/python3.6/dist-packages/pycuda/_driver.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cuDevicePrimaryCtxRelease_v2
I have played around with this quite extensively and even locally I couldn't get python 3 to work, no matter what CUDA toolkit / pycuda version I tried. The failure cause was always an incompatible c++ signature in pycuda (seemingly python 2 does an implicit cast from np.int64 to unsinged long long which python 3 does not do). Not sure whether the root cause for this is a bug in pycuda or something in the openpiv-gpu code.
However I was able to get the notebook to work locally with python 2.7, CUDA toolkit 9.0, gcc 6, pip installed scikit-cuda and latest pip package versions for everything.
Thanks for letting us know @benediktbrandt
On Fri, Oct 16, 2020 at 11:48 PM benediktbrandt notifications@github.com wrote:
If I change the runtime to python3 in colab I get this error:
ImportError: /usr/local/lib/python3.6/dist-packages/pycuda/_driver.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cuDevicePrimaryCtxRelease_v2
I have played around with this quite extensively and even locally I couldn't get python 3 to work, no matter what CUDA toolkit / pycuda version I tried. The failure cause was always an incompatible c++ signature in pycuda (seemingly python 2 does an implicit cast from np.int64 to unsinged long long which python 3 does not do). Not sure whether the root cause for this is a bug in pycuda or something in the openpiv-gpu code.
However I was able to get the notebook to work locally with python 2.7, CUDA toolkit 9.0, gcc 6, pip installed scikit-cuda and latest pip package versions for everything.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenPIV/openpiv-python-gpu/issues/3#issuecomment-710605038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWMZQKLXU455TRRL53OI3SLCWQTANCNFSM4SN5TG7A .
Hi @benediktbrandt, thanks for bringing this to my attention! I'm glad you found a way to get the demo running through Python2 and using the old Cuda toolkit. Unfortunately, when I wrote this, Python2 was the only option. I think to truly fix this issue I need to update the code to run with Python3 as there are sections of the code right now that are not compatible with that. I'll keep this issue open as a reminder to me to update this at some point when I have some time. Let me know if in the meantime I can help with anything else.
The example code
Openpiv_Python_Cython_GPU_demo.ipynb
run in Googles Colaboratory (atimport pycuda.autoinit
) throws the following error: