我正在尝试使用来自 cuRAND 的 Mersenne Twister 设备版本。我尝试在 cuRAND API 文档中使用第二个示例:
3.6。设备 API 示例
我冒昧地将代码复制到单独的 gist 中:
curand.cu
这是我在使用 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)上似乎一切正常:
$ 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
我真的很想在 9400M 上运行 Mersenne Twister(最好来自 cuRAND)。可能吗?如果是这样,您对此有何建议?
谢谢!
更新:
现在我在 9600 GT (Linux) 上也遇到了错误:
$ ./a.out
GPUassert: unknown error curand.cu 99
偶尔我会得到以下信息(9600 GT,Linux):
$ ./a.out
GPUassert: the launch timed out and was terminated curand.cu 99
注意:这可能是由托管 GPGPU 的机器负载引起的(它不是空闲的)。
smmarize:
不适用于- 9400M(Mac)、9600GT(Linux)、GTS250(Linux)
适用于- GTX570(Linux)
以上所有都在 CUDA 工具包 5.5 上运行。