Skip to content

High cpu usage by kernel while using inv and solve from linalg #8120

@vsamy

Description

@vsamy

Hi guys,

So i run into a big trouble while using linalg.solver or linalg.inv. All my 8 cpus are running at 100% where most part is due to the kernel.

First the program:

import numpy as np
import time

np.random.seed(0)
n = 56
A = np.asarray(np.random(n,n))
b = np.eye(A.shape[0])
while True:
               c = np.linalg.solve(A, b)
               time.sleep(1e-2)

Here is what shows htop:
htop

I am running under ubuntu 16.04.1.
Kernel version: 4.4.0-38-generic
Python version: 2.7.12
Numpy version: 1.11.0

Testing it on ubuntu 14.04 with older version of python (2.7.6) and numpy (1.8) seems to work fine.

Any help would be appreciated :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions