Skip to content

why numpy on new machine so slow #24022

@RunxingZhong

Description

@RunxingZhong

Steps to reproduce:

test_numpy.py

import numpy as np

def testfunc(x):
    np.random.seed(x)
    X = np.random.randn(5000, 5000)
    np.linalg.eigh(X @ X.T)

# %timeit testfunc(0)

import time
for i in range(2):
    t1 = time.time()
    testfunc(0)
    t2 = time.time()
    print(t2 - t1)
    # break

python test_numpy.py

Error message:

15.402074337005615
15.52828049659729

each take about 15 sec each testfunc call.
soo slow.

1.  I have test this simple task on another machine too. (same hardware)
machine01 = 15 sec
machine02 = 1.5sec (10 times faster!!)

2. I have test another simple pure c++ program on these two machinws.
machine01 = 20 sec
machine02 = 21 sec
which means these two machine's computing power is close

so I doubt that, some basic lib is incorrect on machine 01, or something wrong happend.
so far, I have try many solutions but failed.
as bellow Additional information: I have list all useful info for you. Thanks

(what should I check next?, please help!)

Additional information:

htop
image

python --version
image

python -m cProfile test_numpy.py # check time cost
image

pip show and config.show()
image

ldd info
image

system info
image

cpus
image

free -h
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    33 - QuestionQuestion about NumPy usage or development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions