integer :: istat, nDevices,ierrSync,ierrAsync ,ierr 

istat = cudaGetDeviceCount(nDevices)
if (istat /= cudaSuccess) write(*,*) cudaGetErrorString(ierr)
ierrSync = cudaGetLastError()
ierrAsync = cudaDeviceSynchronize()
if (ierrSync /= cudaSuccess) write(*,*) 'Sync kernel error:', cudaGetErrorString(ierrSync)
if (ierrAsync /= cudaSuccess) write(*,*) 'Async kernel error:', cudaGetErrorString(ierrAsync)

 

posted on 2020-07-16 21:06  不吃秋葵的橘猫  阅读(121)  评论(0编辑  收藏  举报