Skip to content
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

Taichi crash on GGUI example with arch=CUDA #3455

Closed
GrapixLeGrand opened this issue Nov 10, 2021 · 5 comments
Closed

Taichi crash on GGUI example with arch=CUDA #3455

GrapixLeGrand opened this issue Nov 10, 2021 · 5 comments
Labels
potential bug Something that looks like a bug but not yet confirmed

Comments

@GrapixLeGrand
Copy link

Describe the bug
When running examples with GGUI on CUDA arch the program crash with the bellow error log.

To Reproduce
Run the example stable_fluid_ggui.py in the main repo examples.

GPU: GTX 1050 4GB mobile.
driver version: 496.49

Log/Screenshots

[Taichi] version 0.8.4, llvm 10.0.0, commit 895881b5, win, python 3.8.8
[Taichi] Starting on arch=cuda
[E 11/10/21 16:29:00.652 14320] [taichi/backends/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void * *,struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>::operator ()@86] CUDA Error CUDA_ERROR_INVALID_VALUE: invalid argument while calling import_external_memory (cuImportExternalMemory)


�[38;2;255;000;255m***********************************
�[0m�[38;2;255;000;255m* Taichi Compiler Stack Traceback *
�[0m�[38;2;255;000;255m***********************************
�[0m�[38;2;255;000;255m0x7fffa65a076a: �[0m�[38;2;255;000;000mtaichi::print_traceback�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa646f319: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66c6601: �[0m�[38;2;255;000;000mtaichi::print_traceback�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66c6e31: �[0m�[38;2;255;000;000mtaichi::print_traceback�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa6433f30: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66b3428: �[0m�[38;2;255;000;000mtaichi::print_traceback�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66b61a0: �[0m�[38;2;255;000;000mtaichi::print_traceback�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa6328974: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa6313e95: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa62fce36: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa62f6d9b: �[0m�[38;2;255;000;000mpybind11::error_already_set::discard_as_unraisable�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffb9b1a054: �[0m�[38;2;255;000;000mPyCFunction_Call�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9aec4cc: �[0m�[38;2;255;000;000mPyObject_MakeTpCall�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9c461db: �[0m�[38;2;255;000;000mPy_FatalError�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b2e306: �[0m�[38;2;255;000;000mPy_CheckFunctionResult�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b308c7: �[0m�[38;2;255;000;000mPyEval_EvalFrameDefault�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b2e64e: �[0m�[38;2;255;000;000mPy_CheckFunctionResult�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b30634: �[0m�[38;2;255;000;000mPyEval_EvalFrameDefault�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b2bbd8: �[0m�[38;2;255;000;000mPyEval_EvalCodeWithName�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b5822b: �[0m�[38;2;255;000;000mPyEval_EvalCodeEx�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b58189: �[0m�[38;2;255;000;000mPyEval_EvalCode�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b57eb6: �[0m�[38;2;255;000;000mPyFuture_FromASTObject�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b57e45: �[0m�[38;2;255;000;000mPyFuture_FromASTObject�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9ba7a1f: �[0m�[38;2;255;000;000mPyDict_DelItemString�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9ba77e0: �[0m�[38;2;255;000;000mPyRun_SimpleFileExFlags�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9ba76ab: �[0m�[38;2;255;000;000mPyRun_SimpleFileExFlags�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9cd5297: �[0m�[38;2;255;000;000mPyRun_AnyFileExFlags�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9c7f433: �[0m�[38;2;255;000;000mPy_FatalError�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd4968: �[0m�[38;2;255;000;000mPy_RunMain�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd47f1: �[0m�[38;2;255;000;000mPy_RunMain�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd453e: �[0m�[38;2;255;000;000mPyArgv_AsWstrList�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9c288b9: �[0m�[38;2;255;000;000mPy_Main�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7ff68a301268: �[0m�[38;2;255;000;000mUnknown Function�[0m�[38;2;255;000;255m in python.exe
�[0m�[38;2;255;000;255m0x7ff834857c24: �[0m�[38;2;255;000;000mBaseThreadInitThunk�[0m�[38;2;255;000;255m in KERNEL32.DLL
�[0m�[38;2;255;000;255m0x7ff8365ed721: �[0m�[38;2;255;000;000mRtlUserThreadStart�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;165;000m
Internal error occurred. Check out this page for possible solutions:
https://docs.taichi.graphics/lang/articles/misc/install
�[0mTraceback (most recent call last):
  File "stable_fluid_ggui.py", line 279, in <module>
    canvas.set_image(dyes_pair.cur)
  File "C:\Users\miste\anaconda3\lib\site-packages\taichi\ui\canvas.py", line 22, in set_image
    self.canvas.set_image(info)
RuntimeError: [taichi/backends/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void * *,struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>::operator ()@86] CUDA Error CUDA_ERROR_INVALID_VALUE: invalid argument while calling import_external_memory (cuImportExternalMemory)
[E 11/10/21 16:29:00.883 14320] Received signal 11 (SIGSEGV)


�[38;2;255;000;255m***********************************
�[0m�[38;2;255;000;255m* Taichi Compiler Stack Traceback *
�[0m�[38;2;255;000;255m***********************************
�[0m�[38;2;255;000;255m0x7fffa65a076a: �[0m�[38;2;255;000;000m?print_traceback@taichi@@YAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa646f319: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa658ad28: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7ff83418bf83: �[0m�[38;2;255;000;000m_seh_filter_exe�[0m�[38;2;255;000;255m in ucrtbase.dll
�[0m�[38;2;255;000;255m0x7ff68a302408: �[0m�[38;2;255;000;000mUnknown Function�[0m�[38;2;255;000;255m in python.exe
�[0m�[38;2;255;000;255m0x7ff81a5fe390: �[0m�[38;2;255;000;000m__C_specific_handler�[0m�[38;2;255;000;255m in VCRUNTIME140.dll
�[0m�[38;2;255;000;255m0x7ff836621eef: �[0m�[38;2;255;000;000m__chkstk�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7ff8365eaad9: �[0m�[38;2;255;000;000mRtlRaiseException�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7ff836620b5e: �[0m�[38;2;255;000;000mKiUserExceptionDispatcher�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7fffa8631f2c: �[0m�[38;2;255;000;000m?print_traceback@taichi@@YAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa863319e: �[0m�[38;2;255;000;000m?print_traceback@taichi@@YAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66aef9c: �[0m�[38;2;255;000;000m?print_traceback@taichi@@YAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa66b687a: �[0m�[38;2;255;000;000m?print_traceback@taichi@@YAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa6320503: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa62f4f4e: �[0m�[38;2;255;000;000m?clear@error_already_set@pybind11@@QEAAXXZ�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffa62fcb52: �[0m�[38;2;255;000;000mPyInit_taichi_core�[0m�[38;2;255;000;255m in taichi_core.pyd
�[0m�[38;2;255;000;255m0x7fffb9b21fc4: �[0m�[38;2;255;000;000mPyNumber_InPlaceAdd�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b14986: �[0m�[38;2;255;000;000m_PyObject_GenericSetAttrWithDict�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b1373e: �[0m�[38;2;255;000;000mPyDict_SetItem�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b05e4b: �[0m�[38;2;255;000;000m_PyModule_ClearDict�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9b3dd16: �[0m�[38;2;255;000;000mPyImport_Cleanup�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd53a6: �[0m�[38;2;255;000;000mPy_FinalizeEx�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd47f6: �[0m�[38;2;255;000;000mPy_RunMain�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9bd453e: �[0m�[38;2;255;000;000m_PyArgv_AsWstrList�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7fffb9c288b9: �[0m�[38;2;255;000;000mPy_Main�[0m�[38;2;255;000;255m in python38.dll
�[0m�[38;2;255;000;255m0x7ff68a301268: �[0m�[38;2;255;000;000mUnknown Function�[0m�[38;2;255;000;255m in python.exe
�[0m�[38;2;255;000;255m0x7ff834857c24: �[0m�[38;2;255;000;000mBaseThreadInitThunk�[0m�[38;2;255;000;255m in KERNEL32.DLL
�[0m�[38;2;255;000;255m0x7ff8365ed721: �[0m�[38;2;255;000;000mRtlUserThreadStart�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;165;000m
Internal error occurred. Check out this page for possible solutions:
https://docs.taichi.graphics/lang/articles/misc/install
�[0m

Additional comments
I installed taichi with pip and here is my conda list:

taichi 0.8.4 pypi_0 pypi

Best,
Quentin

@GrapixLeGrand GrapixLeGrand added the potential bug Something that looks like a bug but not yet confirmed label Nov 10, 2021
@k-ye
Copy link
Member

k-ye commented Nov 11, 2021

Hi, could you do a ti diagnose, thanks!

@bobcao3
Copy link
Collaborator

bobcao3 commented Nov 11, 2021

Actually this seems like an known issue of 0.8.4, fixed here #3330. The fix should be in 0.8.5

@GrapixLeGrand
Copy link
Author

GrapixLeGrand commented Nov 11, 2021

Thanks, I'll try with the 0.8.5 version when I'll have time. Thanks for the reply. I'll also put the ti dignose if it still does not work.

@k-ye
Copy link
Member

k-ye commented Nov 12, 2021

FYI v0.8.5 is released :-)

@GrapixLeGrand
Copy link
Author

Hello,

Cuda is working fine now. Thanks :)

Best,
Quentin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed
Projects
None yet
Development

No branches or pull requests

3 participants