Cuda 运行mtgp32 cuRAND设备API示例时出错

Cuda 运行mtgp32 cuRAND设备API示例时出错,cuda,mersenne-twister,Cuda,Mersenne Twister,我正在尝试使用cuRAND的Mersenne Twister设备版本。我尝试在cuRAND API文档中使用第二个示例: 我冒昧地将代码复制到单独的要点中: 这是我使用CUDA Toolkit 5.5在9400M(CC 1.1,Mac OS X 10.8)和GTS 250(CC 1.1,Linux)上执行代码时得到的结果。使用-arch=sm_20仅删除警告,但结果相同: $ nvcc curand.cu && ./a.out ./curand.cu(32): Warning:



我正在尝试使用cuRAND的Mersenne Twister设备版本。我尝试在cuRAND API文档中使用第二个示例:

我冒昧地将代码复制到单独的要点中:

这是我使用CUDA Toolkit 5.5在9400M(CC 1.1,Mac OS X 10.8)和GTS 250(CC 1.1,Linux)上执行代码时得到的结果。使用
-arch=sm_20
仅删除警告,但结果相同:

$ nvcc curand.cu && ./a.out
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
Error at curand.cu:93
奇怪的是,在9600 GT(CC 1.0,Linux)和GTX 570(CC 2.0,Linux)上,一切似乎都正常工作:

我真的很想在9400米处运行Mersenne Twister(最好是从cuRAND运行)。可能吗?如果是的话,你的建议是什么

谢谢

更新:
现在我在9600 GT(Linux)上也看到了错误:

偶尔我会得到以下信息(9600GT,Linux):

注意:这可能是由承载GPGPU的机器的负载引起的(它不是空闲的)

向smmarize:
不适用于-9400M(Mac)、9600GT(Linux)、GTS250(Linux)
适用于-GTX570(Linux)

以上所有操作都在CUDA toolkit 5.5上运行。

看起来您正在与显示器相同的GPU上运行(在评论中确认)。可能是因为您正在超时。有关如何禁用超时的示例,请参阅,或者您可以减少样本计数。

您是否可以修改错误检查以打印出实际的错误消息?例如,我刚刚在Macbook air上运行了这段代码,在OS 10.6.8和CUDA 5下运行了GeForce 320M,它可以为sm_11目标编译。你确定OS X机器的CUDA安装正常吗?@Tom,以下是我使用tour link中提供的宏所得到的信息:
GPUassert:unknown error./curand.cu 99
以下是我代码的要点(以防我包装时出错):@Talonmes,你有错误吗?我的Mac电脑目前没有可以正常工作的CUDA安装(我正在等待OS X 10.9的更新工具包)。在10.8,我在curand.cu:93出现了相同的
错误。以上结果来自Linux机器。注意:其他CUDA示例(如
7\u CUDALibraries/MersenneTwisterGP11213
)似乎工作正常。@dejnon:编译器警告,但这些警告在compute 1.x目标上是正常的,因为它们缺乏统一的寻址支持。但是没有运行时错误,就像您显示的第二个输出一样。这不是一个描述得很清楚的问题。你能准确地解释一下哪个平台有效,哪个平台无效吗?
$ nvcc curand.cu && ./a.out
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
Fraction with low bit set was 0.4999963531494
^^^^ kernel_mtgp_example PASSED
$ ./a.out
GPUassert: unknown error curand.cu 99
$ ./a.out
GPUassert: the launch timed out and was terminated curand.cu 99