【问题标题】:Error while running mtgp32 cuRAND device API example运行 mtgp32 cuRAND 设备 API 示例时出错
【发布时间】:2013-12-09 12:41:14
【问题描述】:



我正在尝试使用来自 cuRAND 的 Mersenne Twister 设备版本。我尝试在 cuRAND API 文档中使用第二个示例:
3.6. Device API Examples
我冒昧地将代码复制到单独的 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(最好来自 cuRAND)上运行 Mersenne Twister。是否可以?如果是这样,您有什么建议这样做?

谢谢!

更新:
现在我在 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 的机器负载引起的(它不是空闲的)。

小型化:
不适用于 - 9400M(Mac)、9600GT(Linux)、GTS250(Linux)
适用于 - GTX570 (Linux)
以上所有内容均在 CUDA 工具包 5.5 上运行。

【问题讨论】:

  • 您能否修改您的错误检查以打印出实际的错误消息?有关示例,请参见 this answer
  • 我刚刚在 Macbook air 上使用 GeForce 320M 在 OS 10.6.8 和 CUDA 5 下运行此代码,它可以正常编译 sm_11 目标。您确定 OS X 机器安装了有效的 CUDA 吗?
  • @Tom ,这是我使用游览链接中提供的宏得到的结果:GPUassert: unknown error ./curand.cu 99 这是我的代码的要点(以防我在包装时做错了):code
  • @talonmies,你有什么错误吗?我的 Mac 现在没有正常工作的 CUDA 安装(我正在等待 OS X 10.9 的更新工具包)。在 10.8 上,我有相同的 Error at curand.cu:93。上面的结果来自 Linux 机器。注意:其他 CUDA 示例(如 7_CUDALibraries/MersenneTwisterGP11213)似乎工作正常。
  • @dejnon:编译器警告,但这些在计算 1.x 目标上是正常的,因为它们缺乏统一的寻址支持。但没有运行时错误,就像您显示的第二个输出一样。这不是一个描述得很清楚的问题。你能准确解释一下哪个平台有效,哪个无效?

标签: cuda mersenne-twister


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多