Question: I am learning deep learning recently and my friend recommended me caffe. After install it with OpenBLAS, I followed the tutorial, [MNIST task](http://caffe.berkeleyvision.org/gathered/examples/mnist.html) in the doc. But later I found it was super slow and only one CPU core was working.

The problem is that the servers in my lab don't have GPU, so I have to use CPUs instead.

I Googled this and got some page like [this](https://github.com/BVLC/caffe/pull/80) . I tried to `export OPENBLAS_NUM_THREADS=8` and `export OMP_NUM_THREADS=8`. But caffe still used one core.

How can I make caffe use multi CPUs?

Many thanks.

Answer: 
While building OpenBLAS, you have to set the flag USE\_OPENMP = 1 to enable OpenMP support. Next set Caffe to use OpenBLAS in the Makefile.config, please export the number of threads you want to use during runtime by setting up OMP\_NUM\_THREADS=n where n is the number of threads you want.
I found that this method works:

When you build the caffe, in your make command, do use this for 8 cores: 
`make all -j8` and
`make pycaffe -j8`

Also, make sure 
 `OPENBLAS_NUM_THREADS=8` 
is set.

[This](https://stackoverflow.com/questions/31395729/how-to-enable-multithreading-with-caffe) question has a full script for the same.