Why error 46 occurs when calling cudaMalloc() on Ubuntu 16.04 with nopat enabled?

I need to accelerate the memcpy(), and I find that the memcpy() works as I want if nopat enabled:

linux /vmlinuz-4.15.0-54-generic root=UUID=0e6bc09c-321d-4615-b04b-0a75b9ce3d78 ro <b><i>nopat </i></b>quiet splash $vt_handoff

after that, I run the sample matrixMul, in which the cudaMalloc() is invoked, and the error 46 occurs:

[Matrix Multiply Using CUDA] - Starting...
GPU Device 0: "GeForce GTX 1060 6GB" with compute capability 6.1
MatrixA(320,320), MatrixB(640,320)
cudaMalloc d_A returned error <b><i>all CUDA-capable devices are busy or unavailable (code 46)</i></b>, line(165)

I try to disable the GUI, but the error remains.
How can I use cudaMalloc() with nopat enabled?

1 Like

My GPU information:

$ nvidia-smi

Fri Jul 12 23:38:12 2019       

+-----------------------------------------------------------------------------+

| NVIDIA-SMI 430.34       Driver Version: 430.34       CUDA Version: 10.1     |

|-------------------------------+----------------------+----------------------+

| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |

| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |

|===============================+======================+======================|

|   0  GeForce GTX 106...  Off  | 00000000:01:00.0 Off |                  N/A |

| 41%   35C    P0    26W / 130W |      0MiB /  6078MiB |      2%      Default |

+-------------------------------+----------------------+----------------------+
1 Like