大家好,我用太极写了一个仿真程序,在本地机器上可以正常运行,但在服务器上运行却出现了一些问题。
当我使用ti.cuda初始化时,ggui会报如下错误:
[Taichi] version 1.4.1, llvm 15.0.4, commit e67c674e, linux, python 3.9.13
[I 03/02/23 21:52:15.177 346087] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout
[Taichi] Starting on arch=cuda
90601
[E 03/02/23 21:52:22.420 346087] [cuda_driver.h:operator()@88] CUDA Error CUDA_ERROR_INVALID_DEVICE: invalid device ordinal while calling external_memory_get_mapped_buffer (cuExternalMemoryGetMappedBuffer)
Traceback (most recent call last):
File "/home/luyin/anaconda3/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "/home/luyin/Desktop/Anisotropic-MPM/1AA_source/1A_working_version/1A_hanger_02_20/1A_sparse/1A_main_with_GUI.py", line 263, in <module>
main()
File "/home/luyin/Desktop/Anisotropic-MPM/1AA_source/1A_working_version/1A_hanger_02_20/1A_sparse/1A_main_with_GUI.py", line 249, in main
render(obj_list, boundary_list, camera, scene, canvas, window, axisX, axisY, axisZ, colorX, colorY, colorZ,Circle_Center,Circle_Radius)
File "/home/luyin/Desktop/Anisotropic-MPM/1AA_source/1A_working_version/1A_hanger_02_20/1A_sparse/render.py", line 60, in render
canvas.scene(scene)
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/ui/canvas.py", line 136, in scene
self.canvas.scene(scene.scene)
RuntimeError: [cuda_driver.h:operator()@88] CUDA Error CUDA_ERROR_INVALID_DEVICE: invalid device ordinal while calling external_memory_get_mapped_buffer (cuExternalMemoryGetMappedBuffer)
注释了ggui部分后,主程序可以正常运行。
在运行ggui的范例程序时,ti.cuda也是报同样的错误,ti.vulkan可以正常运行。但是我的主程序用ti.vulkan时会报如下错误:
[Taichi] version 1.4.1, llvm 15.0.4, commit e67c674e, linux, python 3.9.13
[I 03/02/23 21:45:50.975 345528] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout
[Taichi] Starting on arch=vulkan
90601
[E 03/02/23 21:45:52.427 345528] [spirv_codegen.cpp:generate_listgen_kernel@2100] Not supported.
Traceback (most recent call last):
File "/home/luyin/anaconda3/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "/home/luyin/Desktop/Anisotropic-MPM/1AA_source/1A_working_version/1A_hanger_02_20/1A_sparse/1A_main_with_GUI.py", line 263, in <module>
main()
File "/home/luyin/Desktop/Anisotropic-MPM/1AA_source/1A_working_version/1A_hanger_02_20/1A_sparse/1A_main_with_GUI.py", line 239, in main
Reset()
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/lang/kernel_impl.py", line 974, in wrapped
return primal(*args, **kwargs)
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/lang/shell.py", line 27, in new_call
ret = old_call(*args, **kwargs)
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/lang/kernel_impl.py", line 901, in _call_
return self.runtime.compiled_functions[key](*args)
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/lang/kernel_impl.py", line 826, in func__
raise e from None
File "/home/luyin/anaconda3/lib/python3.9/site-packages/taichi/lang/kernel_impl.py", line 823, in func__
t_kernel(launch_ctx)
RuntimeError: [spirv_codegen.cpp:generate_listgen_kernel@2100] Not supported.
服务器的gpu信息如下:
本地的gpu信息如下:
请问应该如何解决呢?谢谢!