cuda-memcheck:无法启动应用程序 (14)

cuda-memcheck: Could not start the application (14)

我正在尝试使用 cuda-memcheck 来调试我的应用程序。 Ubuntu12.04,GeForce GTX 680/K20c,CUDA 6.5。

简单的例子,trivial.cu

#include <stdio.h>

__global__ void foo()
{
}

int main()
{
  foo<<<1,1>>>();
  printf("CUDA error: %s\n", cudaGetErrorString(cudaGetLastError()));  
  return 0;
}

我通过nvcc trivial.cu -o trivial.bin编译了它。 运行 ./trivial.bin 现在可以直接使用了。它打印输出:

CUDA error: no error

现在我通过 cuda-memcheck ./trivial.bin 调用它。 COMPUTE_PROFILECUDA_PROFILECUDA_INJECTION32_DLLCUDA_INJECTION64_DLL 均未设置。我有 /tmp 的写入权限。 $TMPDIR = /var/tmp/625352.1.16C-32G-GPU-K20,我也可以写信给$TMPDIR

我得到这个输出:

========= CUDA-MEMCHECK
========= Could not start the application (14)
========= No CUDA-MEMCHECK results found

(可能与 SGE 相关。我只在非交互式 SGE 作业中遇到此错误。)

我现在可以通过以下方式在交互式 shell 中重现错误:

mkdir /var/tmp/625352.1.16C-32G-GPU-K20
export TMPDIR=/var/tmp/625352.1.16C-32G-GPU-K20
cuda-memcheck ./trivial.bin

所以它不知何故与这个 $TMPDIR 混淆了。这似乎是 cuda-memcheck 中的一个内部错误。 如果 $TMPDIR 的长度大于或等于 30 个字符,似乎会发生这种情况。

我没有在 Google 上找到任何关于此错误的结果,也没有在文档中找到。

问题是什么?我该如何解决这个问题?我怎样才能找出错误的含义?错误代码 (14) 是什么意思? (我可以在哪里问?)


strace 输出:

+ strace cuda-memcheck ./trivial.bin
execve("/usr/local/cuda-6.5/bin/cuda-memcheck", ["cuda-memcheck", "./trivial.bin"], [/* 122 vars */]) = 0
brk(0)                                  = 0x1af8000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d6f1000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libdl.so.2", O_RDONLY|O_CLOEXEC)  = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/usr/local/cuda-6.0/lib64/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.0/lib64/tls/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.0/lib64/tls", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.0/lib64/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.0/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/atlas-base/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/atlas-base/tls/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/atlas-base/tls", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/atlas-base/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/atlas-base", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/local/cuda-6.5/lib64/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.5/lib64/tls/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.5/lib64/tls", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.5/lib64/x86_64", 0x7fff1cb31520) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/cuda-6.5/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=115443, ...}) = 0
mmap(NULL, 115443, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b430d720000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]0\r[=14=][=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0
mmap(NULL, 2109704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430d920000
mprotect(0x2b430d922000, 2097152, PROT_NONE) = 0
mmap(0x2b430db22000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b430db22000
close(3)                                = 0
open("tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]0l[=14=][=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=135366, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d6f3000
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430db28000
mprotect(0x2b430db40000, 2093056, PROT_NONE) = 0
mmap(0x2b430dd3f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x2b430dd3f000
mmap(0x2b430dd41000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b430dd41000
close(3)                                = 0
open("tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("librt.so.1", O_RDONLY|O_CLOEXEC)  = -1 ENOENT (No such file or directory)
open("/usr/local/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]0![=14=][=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2128984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430dd48000
mprotect(0x2b430dd4f000, 2093056, PROT_NONE) = 0
mmap(0x2b430df4e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x2b430df4e000
close(3)                                = 0
open("tls/x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]P1[=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=962656, ...}) = 0
mmap(NULL, 3142544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430df50000
mprotect(0x2b430e032000, 2093056, PROT_NONE) = 0
mmap(0x2b430e231000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe1000) = 0x2b430e231000
mmap(0x2b430e23b000, 82832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b430e23b000
close(3)                                = 0
open("tls/x86_64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libm.so.6", O_RDONLY|O_CLOEXEC)   = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]pU[=14=][=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1030512, ...}) = 0
mmap(NULL, 3125544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430e250000
mprotect(0x2b430e34b000, 2093056, PROT_NONE) = 0
mmap(0x2b430e54a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfa000) = 0x2b430e54a000
close(3)                                = 0
open("tls/x86_64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]0([=14=][=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=88384, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d6f4000
mmap(NULL, 2184216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430e550000
mprotect(0x2b430e565000, 2093056, PROT_NONE) = 0
mmap(0x2b430e764000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x2b430e764000
close(3)                                = 0
open("tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY|O_CLOEXEC)   = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.0/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/atlas-base/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/cuda-6.5/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF[=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=][=14=]>[=14=][=14=][=14=][=14=]0[=14=][=14=][=14=][=14=][=14=]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1815224, ...}) = 0
mmap(NULL, 3929304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b430e768000
mprotect(0x2b430e91d000, 2097152, PROT_NONE) = 0
mmap(0x2b430eb1d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b5000) = 0x2b430eb1d000
mmap(0x2b430eb23000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b430eb23000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d6f5000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d6f6000
arch_prctl(ARCH_SET_FS, 0x2b430d6f6340) = 0
mprotect(0x2b430eb1d000, 16384, PROT_READ) = 0
mprotect(0x2b430e764000, 4096, PROT_READ) = 0
mprotect(0x2b430e54a000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d71a000
mprotect(0x2b430e231000, 32768, PROT_READ) = 0
mprotect(0x2b430dd3f000, 4096, PROT_READ) = 0
mprotect(0x2b430df4e000, 4096, PROT_READ) = 0
mprotect(0x2b430db22000, 4096, PROT_READ) = 0
mprotect(0x2b430d91a000, 4096, PROT_READ) = 0
munmap(0x2b430d720000, 115443)          = 0
set_tid_address(0x2b430d6f6610)         = 2023
set_robust_list(0x2b430d6f6620, 0x18)   = 0
futex(0x7fff1cb31e1c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 2b430d6f6340) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x2b430db2e750, [], SA_RESTORER|SA_SIGINFO, 0x2b430db37cb0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x2b430db2e7e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x2b430db37cb0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
futex(0x2b430e23bed0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0)                                  = 0x1af8000
brk(0x1b19000)                          = 0x1b19000
fstat(1, {st_mode=S_IFREG|0644, st_size=28120, ...}) = 0
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b430d71b000
statfs("/dev/shm/", {f_type=0x1021994, f_bsize=4096, f_blocks=4116014, f_bfree=4116014, f_bavail=4116014, f_files=4116014, f_ffree=4116011, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
futex(0x2b430df4f360, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/dev/shm/2023", O_RDWR|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/dev/shm/2023", O_RDWR|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/dev/shm/2023", O_RDWR|O_CREAT|O_EXCL|O_TRUNC|O_NOFOLLOW|O_CLOEXEC, 0600) = 3
ftruncate(3, 262176)                    = 0
mmap(NULL, 262176, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x2b430d820000
open("/dev/shm/2023", O_RDWR|O_NOFOLLOW|O_CLOEXEC) = 4
lseek(4, 0, SEEK_END)                   = 262176
mmap(NULL, 262176, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x2b430d868000
write(1, "========= CUDA-MEMCHECK\n========"..., 112========= CUDA-MEMCHECK
========= Could not start the application (14)
========= No CUDA-MEMCHECK results found
) = 112
exit_group(0)                           = ?

这似乎是 cuda-memcheck 的内部错误。如果 $TMPDIR 的长度大于或等于 30 个字符,似乎会发生这种情况。我猜他们存储临时文件名的内部缓冲区太短了。

作为解决方法,我现在这样做:

ln -s $TMPDIR /tmp/cuda-$PPID
export TMPDIR=/tmp/cuda-$PPID