error == cudaSuccess (11 vs. 0)

819 views
Skip to first unread message

Usama Shafiq

unread,
Jan 18, 2016, 10:19:27 AM1/18/16
to Caffe Users
I try to setup caffe for GPU. I have compute compatibility is 2.1. The "make all" is successful. But when i run "make runtest", it fails and give
error == cudaSuccess (11 vs. 0)

any help is appreciated?

Jan C Peters

unread,
Jan 19, 2016, 4:30:15 AM1/19/16
to Caffe Users
From cuda docs:

cudaErrorInvalidValue = 11
This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

A google search brings up this: https://github.com/rbgirshick/rcnn/issues/28. Maybe that helps you? To actually solve this problem we need more information, what is the context (surrounding lines) of the error message? What was caffe doing when it failed? Which test did actually fail?

Jan

Jan C Peters

unread,
Jan 19, 2016, 5:37:47 AM1/19/16
to Caffe Users
Referring to the link I posted earlier, this does not seem to be exclusive to this compute capability 2.1.

BUT: the reference mentions as a solution approach to add corresponding compilation flags (-gencode) for your card. Make sure the correct cod and arch attributes for your card are included.
[I think arch 1.x was deprecated by CUDA, not sure if that still works but you could add it and try.]


Jan


Am Montag, 18. Januar 2016 16:19:27 UTC+1 schrieb Usama Shafiq:

Usama Shafiq

unread,
Jan 19, 2016, 10:17:57 AM1/19/16
to Caffe Users
when i run "make runtest". it fails and give following output:

[----------] 3 tests from MSRAFillerTest/0, where TypeParam = float
[ RUN      ] MSRAFillerTest/0.TestFillFanOut
[       OK ] MSRAFillerTest/0.TestFillFanOut (3 ms)
[ RUN      ] MSRAFillerTest/0.TestFillFanIn
[       OK ] MSRAFillerTest/0.TestFillFanIn (3 ms)
[ RUN      ] MSRAFillerTest/0.TestFillAverage
[       OK ] MSRAFillerTest/0.TestFillAverage (3 ms)
[----------] 3 tests from MSRAFillerTest/0 (9 ms total)

[----------] 2 tests from EuclideanLossLayerTest/3, where TypeParam = caffe::GPUDevice<double>
[ RUN      ] EuclideanLossLayerTest/3.TestForward
F0119 20:16:47.911201 15500 math_functions.cu:79] Check failed: error == cudaSuccess (11 vs. 0)  invalid argument
*** Check failure stack trace: ***
make: *** [runtest] Aborted (core dumped)

Usama Shafiq

unread,
Jan 19, 2016, 10:19:32 AM1/19/16
to Caffe Users
my Makefile.config file is

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 lines for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
        -gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_50,code=compute_50

Emiel Stoelinga

unread,
Jun 16, 2016, 8:02:55 PM6/16/16
to Caffe Users
Where to edit those flags used during make runtest?

Op dinsdag 19 januari 2016 11:37:47 UTC+1 schreef Jan:

soubarna banik

unread,
Jul 3, 2019, 5:54:33 AM7/3/19
to Caffe Users
I was getting the same error while running the implementation of faster_rcnn in caffe. Turned out my machine had multiple installation of cuda and the default cuda was linked to cuda 8.0. And faster_rcnn needs cuda 9 and hence the invalid argument error. I changed the CUDA_DIR path to point CUDA 9 in Makefile.config. 
Reply all
Reply to author
Forward
0 new messages