Command-line option for *no* GPUs?

193 views
Skip to first unread message

Jesse Connell

unread,
May 13, 2016, 1:27:21 PM5/13/16
to Caffe Users
I'm testing out our new Caffe installation (rc3 compiled on CentOS 6, built against CUDA 6.0) and trying to run some of the command-line examples from the tutorial docs.  I'm getting errors like this one:

F0513 13:11:32.668946 16725 sgd_solver.cu:19] Check failed: error == cudaSuccess (9 vs. 0)  invalid configuration argument

To simplify the test for now, I'd like to just turn off GPU support for this particular run, but I don't see how to do it.  The tutorial ( http://caffe.berkeleyvision.org/tutorial/interfaces.html ) says that without -gpu it'll just use the CPU (for example in the Benchmarking section), but when I try it, it still tries the GPU.  For example, this command:

caffe train -solver models/finetune_flickr_style/solver.prototxt -weights models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel

Shows this first line on stdout:

I0513 13:22:49.173905  6741 caffe.cpp:185] Using GPUs 0

... and then fails as mentioned above.  My question is, is there something like "-gpu all" that instead acts as "-gpu none"?  Thanks in advance for any ideas.

Jesse

Ahmed Ibrahim

unread,
May 16, 2016, 9:28:41 AM5/16/16
to Caffe Users
you must make sure that your solver.prototxt specifies CPU not GPU then running without -gpu should work on CPU 

Jesse Connell

unread,
May 17, 2016, 9:59:16 AM5/17/16
to Caffe Users
Thanks, that did the trick.
Reply all
Reply to author
Forward
0 new messages