{"action":"created","issue":{"url":"https://api.github.com/repos/pjreddie/darknet/issues/372","repository_url":"https://api.github.com/repos/pjreddie/darknet","labels_url":"https://api.github.com/repos/pjreddie/darknet/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/pjreddie/darknet/issues/372/comments","events_url":"https://api.github.com/repos/pjreddie/darknet/issues/372/events","html_url":"https://github.com/pjreddie/darknet/issues/372","id":282855937,"number":372,"title":"CUDA Error: invalid device ordinal (Ubuntu 16,  NVIDIA Quadro P4000)","user":{"login":"MattCollins84","id":795287,"avatar_url":"https://avatars1.githubusercontent.com/u/795287?v=4","gravatar_id":"","url":"https://api.github.com/users/MattCollins84","html_url":"https://github.com/MattCollins84","followers_url":"https://api.github.com/users/MattCollins84/followers","following_url":"https://api.github.com/users/MattCollins84/following{/other_user}","gists_url":"https://api.github.com/users/MattCollins84/gists{/gist_id}","starred_url":"https://api.github.com/users/MattCollins84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattCollins84/subscriptions","organizations_url":"https://api.github.com/users/MattCollins84/orgs","repos_url":"https://api.github.com/users/MattCollins84/repos","events_url":"https://api.github.com/users/MattCollins84/events{/privacy}","received_events_url":"https://api.github.com/users/MattCollins84/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-12-18T12:03:32Z","updated_at":"2018-05-13T16:38:28Z","closed_at":"2018-01-02T10:31:51Z","author_association":"NONE","body":"I'm getting this when I try to run the GPU enabled example from the website, successfully ran `make` with `GPU=1`, no `OpenCV`.\r\n\r\nRunning on Ubuntu 16,  with NVIDIA Quadro P4000 on `nvidia-387` drivers\r\n\r\n````\r\n$ ./darknet -i 1 imagenet test cfg/alexnet.cfg alexnet.weights\r\nCUDA Error: invalid device ordinal\r\ndarknet: ./src/cuda.c:36: check_error: Assertion `0' failed.\r\nAborted (core dumped)\r\n\r\n$ nvidia-smi\r\nMon Dec 18 11:50:55 2017       \r\n+-----------------------------------------------------------------------------+\r\n| NVIDIA-SMI 387.34                 Driver Version: 387.34                    |\r\n|-------------------------------+----------------------+----------------------+\r\n| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\r\n|===============================+======================+======================|\r\n|   0  Quadro P4000        Off  | 00000000:65:00.0  On |                  N/A |\r\n| 46%   37C    P0    30W / 105W |    199MiB /  8110MiB |      0%      Default |\r\n+-------------------------------+----------------------+----------------------+\r\n                                                                               \r\n+-----------------------------------------------------------------------------+\r\n| Processes:                                                       GPU Memory |\r\n|  GPU       PID   Type   Process name                             Usage      |\r\n|=============================================================================|\r\n|    0      1160      G   /usr/lib/xorg/Xorg                           149MiB |\r\n|    0      1834      G   compiz                                        46MiB |\r\n+-----------------------------------------------------------------------------+\r\n````\r\n\r\nI think CUDA is installed fine, I can run `deviceQuery` ok:\r\n\r\n````\r\n./deviceQuery Starting...\r\n\r\n CUDA Device Query (Runtime API) version (CUDART static linking)\r\n\r\nDetected 1 CUDA Capable device(s)\r\n\r\nDevice 0: \"Quadro P4000\"\r\n  CUDA Driver Version / Runtime Version          9.1 / 8.0\r\n  CUDA Capability Major/Minor version number:    6.1\r\n  Total amount of global memory:                 8111 MBytes (8504868864 bytes)\r\n  (14) Multiprocessors, (128) CUDA Cores/MP:     1792 CUDA Cores\r\n  GPU Max Clock rate:                            1480 MHz (1.48 GHz)\r\n  Memory Clock rate:                             3802 Mhz\r\n  Memory Bus Width:                              256-bit\r\n  L2 Cache Size:                                 2097152 bytes\r\n  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)\r\n  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers\r\n  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers\r\n  Total amount of constant memory:               65536 bytes\r\n  Total amount of shared memory per block:       49152 bytes\r\n  Total number of registers available per block: 65536\r\n  Warp size:                                     32\r\n  Maximum number of threads per multiprocessor:  2048\r\n  Maximum number of threads per block:           1024\r\n  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)\r\n  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)\r\n  Maximum memory pitch:                          2147483647 bytes\r\n  Texture alignment:                             512 bytes\r\n  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)\r\n  Run time limit on kernels:                     Yes\r\n  Integrated GPU sharing Host Memory:            No\r\n  Support host page-locked memory mapping:       Yes\r\n  Alignment requirement for Surfaces:            Yes\r\n  Device has ECC support:                        Disabled\r\n  Device supports Unified Addressing (UVA):      Yes\r\n  Device PCI Domain ID / Bus ID / location ID:   0 / 101 / 0\r\n  Compute Mode:\r\n     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >\r\n\r\ndeviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = Quadro P4000\r\nResult = PASS\r\n````\r\n\r\nAnd `bandwidthTest` gets me:\r\n\r\n````\r\n[CUDA Bandwidth Test] - Starting...\r\nRunning on...\r\n\r\n Device 0: Quadro P4000\r\n Quick Mode\r\n\r\n Host to Device Bandwidth, 1 Device(s)\r\n PINNED Memory Transfers\r\n   Transfer Size (Bytes)\tBandwidth(MB/s)\r\n   33554432\t\t\t12072.5\r\n\r\n Device to Host Bandwidth, 1 Device(s)\r\n PINNED Memory Transfers\r\n   Transfer Size (Bytes)\tBandwidth(MB/s)\r\n   33554432\t\t\t12875.6\r\n\r\n Device to Device Bandwidth, 1 Device(s)\r\n PINNED Memory Transfers\r\n   Transfer Size (Bytes)\tBandwidth(MB/s)\r\n   33554432\t\t\t190374.6\r\n\r\nResult = PASS\r\n````\r\n\r\nI'm a bit of a newbie with this so if you need any more info let me know! Any ideas?"},"comment":{"url":"https://api.github.com/repos/pjreddie/darknet/issues/comments/388639632","html_url":"https://github.com/pjreddie/darknet/issues/372#issuecomment-388639632","issue_url":"https://api.github.com/repos/pjreddie/darknet/issues/372","id":388639632,"user":{"login":"89douner","id":31752297,"avatar_url":"https://avatars2.githubusercontent.com/u/31752297?v=4","gravatar_id":"","url":"https://api.github.com/users/89douner","html_url":"https://github.com/89douner","followers_url":"https://api.github.com/users/89douner/followers","following_url":"https://api.github.com/users/89douner/following{/other_user}","gists_url":"https://api.github.com/users/89douner/gists{/gist_id}","starred_url":"https://api.github.com/users/89douner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/89douner/subscriptions","organizations_url":"https://api.github.com/users/89douner/orgs","repos_url":"https://api.github.com/users/89douner/repos","events_url":"https://api.github.com/users/89douner/events{/privacy}","received_events_url":"https://api.github.com/users/89douner/received_events","type":"User","site_admin":false},"created_at":"2018-05-13T16:38:28Z","updated_at":"2018-05-13T16:38:28Z","author_association":"NONE","body":"Thanks a lot!!"}}
{"actor":{"display_login":"89douner"}}