Optimizing Keras to use all available CPU resources
<p>Ok, I don't really know what I'm talking about here so bear with me. </p>

<p>I am running Keras with Theano backend to run a basic neural net (just a tutorial set up for now) on MNIST images. In the past, I have been using my old HP laptop because I have a dual boot setup with Windows and Ubuntu 16.06. I am trying to replace this laptop so I can retire it and use my new(er) Sony laptop. I set up the same dual boot with Ubuntu 16.06 and Windows 10. Here is the issue:</p>

<p>When I run it on my old HP (Ubuntu), I get significantly better performance (in terms of time). I ran the same program on both machines at the same time and, using the Ubuntu system monitor, found that the old HP machine uses all 4 cores and, thus, 100% of available CPU. The newer Sony only uses 1 core and caps out at ~26% CPU. </p>

<p>I would prefer to avoid having to deal with manually multi-threading if at all possible. I have tried using openmp to no avail, and the HP uses all 4 cores without it anyway.</p>

<p>I'm pretty sure that I followed the same setup on both  machines but I may have installed extra packages on the HP since I did that a while ago and may have forgotten what I installed. I have also tried using Python (2.7) and python3, each with the same setup.</p>

<p>I don't know what I'm looking for, but any ideas or input would be greatly appreciated. I'm happy to provide any more information as I'm not sure what is relevant in this case. And thank you in advance.</p>

<p>Ok of course I figured it out right after I posted the question. Sorry if I wasted anyone's time. </p>

<p>I just reinstalled everything using apt-get instead of pip and that worked. Not sure why,  maybe I missed something the first time. Anyway, </p>

<pre><code>sudo apt-get install python-numpy python-scipy python-dev python-nose g++ libblas-dev git
</code></pre>

<p>fixed it. Not sure which package. I think I just used <code>sudo apt-get install theano</code> the the first time. </p>

python multithreading ubuntu theano keras