1

This question was initially asked on stackoverflow byt was found to be off-topic, the text below has been updated from the initial post with new details.

I recently acquired a new PC with an i7 processor. I installed Fedora 24 on it, along with Python and several libraries required for scientific programming such as Numpy and Scipy (Numpy version 1.11.0).

After installing all I needed, I ran some test codes (downloaded from here) in order to assess the speed of the system, in particular:

test_numpy.py which contains:

#!/usr/bin/env    
python    
import numpy
import sys
import timeit

try:
    import numpy.core._dotblas
    print 'FAST BLAS'
except ImportError:
    print 'slow blas'

print "version:", numpy.__version__
print "maxint:", sys.maxint
print

x = numpy.random.random((1000,1000))

setup = "import numpy; x = numpy.random.random((1000,1000))"
count = 5

t = timeit.Timer("numpy.dot(x, x.T)", setup=setup)
print "dot:", t.timeit(count)/count, "sec"

After running this code, I obtain:

slow blas
version: 1.11.0
maxint: 9223372036854775807
dot: 0.0981109619141 sec

My problem is that on much older PCs, I get much smaller execution times for "dot". In particular, for an older (2012) Windows PC with an i7 processor, I get:

FAST BLAS
version: 1.9.1
maxint: 2147483647
dot: 0.0459410942418 sec

And with an older (2013) i7 PC running Linux Mint 18, I get:

slow blas
version: 1.11.0
maxint: 9223372036854775807
dot: 0.0240209579468 sec

As you can see, the older PCs, in particular the one running Linux Mint 18 is about 4 times faster...

I installed all these PCs myself. In particular, for the most recent one with Fedora, I used both python 2.x and 3.x with the numpy package: (1) on dnf and (2) by compiling it from sources (as explained here). I shall also add that all the times mentioned above are representative of values obtained after executing the code several times, without any other running process.

I believe I am missing something here. I have no idea what to do in order to obtain decent performances with my new PC...

(The exact same problem has been observed on other recent PCs with Fedora 23 and Mint 18.)

Update:

I installed Ubuntu 16.04 instead of Fedora 24 on the recent PC mentioned above. Computation times for Numpy dot have been divided by 10 and are significantly lower for the other tests:

$ python test_numpy.py 
slow blas
version: 1.11.0
maxint: 9223372036854775807
dot: 0.00876359939575 sec
$ python test_scipy.py 
cholesky: 0.00768299102783 sec
svd: 0.304620409012 sec

The only piece of information I could find online is on a very old post but I find hard to believe that such type of bug could last for so long.

0

You must log in to answer this question.

Browse other questions tagged .