我有兴趣尝试 GPU 模拟器,但我尝试使用 Multi2Sim、GPGPU-sim 和 Ocelot,对于这三个模拟器中的每一个,我都遇到了一个问题,在互联网上似乎很难找到解决方案。我将描述每个模拟器遇到的问题,也许您可以提供帮助。首先,为了给你一些详细的背景信息,我使用的是 Ubuntu 12.04 LTS。
Multi2Sim 说它与 64 位不兼容,因此您应该编译为 32 位。如果我为 32 位编译 CUDA 代码,那么当我运行编译后的可执行文件时,我收到错误消息“CUDA driver version is enough for CUDA runtime version”。如果我为 32 位编译 OpenCL 代码,那么当我运行编译后的可执行文件时,我发现函数 clGetPlatformIDs 并没有给我在为 64 位编译时获得的 Nvidia OpenCL 平台。
GPGPU-sim 的文档说:
我们使用 NVIDIA 驱动程序版本 256.40 在 GPGPU-Sim 上测试了 OpenCL http://developer.download.nvidia.com/compute/cuda/3_1/drivers/devdriver_3.1_linux_64_256.40.run 注意最新版本的 NVIDIA 驱动程序产生与此版本的 GPGPU-Sim 不兼容的 PTX。
我有 NVIDIA 驱动程序版本 295.49。当我从“系统设置”中查看“其他驱动程序”时,我看到列出了两件事:“NVIDIA 加速图形驱动程序(当前版本)[推荐]”和“NVIDIA 加速图形驱动程序(发布后更新)(当前版本更新) ”。第一个已激活,因此我单击“删除”,然后第二个自动激活。所以我决定尝试安装 256.40 版本,但我收到了这条错误消息,这让我很害怕:
ERROR: If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.
If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.
Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.
当我尝试构建 Ocelot 时,我得到以下信息,即使我遵循了“从 LLVM SVN 中提取并构建”的说明:
ocelot/ocelot/ir/implementation/ExternalFunctionSet.cpp:27:36: fatal error: llvm/Target/TargetData.h: No such file or directory