我的sph程序在算到一定步数后会发生如下的error,应该是算法方面的问题。发生这个error之后程序就会停止,我想能不能在发生这个error之后,导出现在的field变量,好方便我之后检查问题在哪?
以及此处的“illegal memory access”错误,是数组索引越界导致的吗?
[W 07/21/23 12:47:41.293 12612] [taichi/rhi/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void * *,void *,char const *>::call_with_warning@85] CUDA Error CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered while calling module_get_function (cuModuleGetFunction) L_ADDRESS: an illegal
[E 07/21/23 12:47:41.295 12612] [taichi/runtime/cuda/jit_cuda.h:taichi::lang::JITModuleCUDA::lookup_function@54] Cannot look up function reset_outside_particle_c102_0_kernel_1_range_for ange_for
Traceback (most recent call last):
File "c:\Users\server\Desktop\better exclude\run_simlation.py", line 113, in <module>
solver.step()
File "c:\Users\server\Desktop\better exclude\sph_base.py", line 257, in step
self.ps.initialize_particle_system()
File "c:\Users\server\Desktop\better exclude\particle_system.py", line 506, in initialize_particle_system
self.reset_outside_particle()
File "C:\Users\server\anaconda3\lib\site-packages\taichi\lang\kernel_impl.py", line 1033, in __call__
return self._primal(self._kernel_owner, *args, **kwargs)
File "C:\Users\server-liuyunpu\anaconda3\lib\site-packages\taichi\lang\kernel_impl.py", line 906, in __call__
return self.runtime.compiled_functions[key](*args)
File "C:\Users\server\anaconda3\lib\site-packages\taichi\lang\kernel_impl.py", line 817, in func__
raise e from None
File "C:\Users\server\anaconda3\lib\site-packages\taichi\lang\kernel_impl.py", line 814, in func__
t_kernel(launch_ctx)
RuntimeError: [taichi/runtime/cuda/jit_cuda.h:taichi::lang::JITModuleCUDA::lookup_function@54] Cannot look up function reset_outside_particle_c102_0_kernel_1_range_for
[E 07/21/23 12:47:41.559 12612] [taichi/rhi/cuda/cuda_driver.h:taichi::lang::CUDADriverFunction<void *>::operator ()@92] CUDA Error CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountere access was encountered while calling stream_synchronize (cuStreamSynchronize)