简体   繁体   中英

Spyder running code really slow on Ubuntu

I am trying to run some python code on a workstation with Ubuntu 14.04 LTS. The workstation has a Intel® Xeon(R) CPU E5-2630 v3 @ 2.40GHz × 16 processor, and all threads are activating and working. The problem is that I ran this code in windows (same machine) and it took 3 minutes to run running in Spyder, on Ubuntu running in Spyder it has been more than an hour, and the code hasn't finished running. Spyder is only using 8% of my total CPU power!!! and when I check system monitor only one thread is being used 100% and the rest either 0 or 1.**% where * is any integer from 0-9.

Seems like either Ubuntu or Spyder is not using the full potential of the CPU and I have no clue why. Hyperthreading is activated and all cores are being used by ubuntu.

edit: Ubuntu is using all threads, but python is not. In fact, Python is using only 1 CPU. I searched around the forums and found a thread of somebody who had the same problem 16 threads, only 1 being used. They fixed it by running this "os.system("taskset -p 0xffffffff %d"% os.getpid())" before your code. This didn't do it for me. This is driving me insane, I really need to use all cores or this workstation is less powerful than my $200 laptop.

Try Continuum Intel's Math Kernel Library (MKL). See here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM