{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/8120","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/8120/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8120/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/8120/events","html_url":"https://github.com/numpy/numpy/issues/8120","id":180932739,"number":8120,"title":"High cpu usage by kernel while using inv and solve from linalg","user":{"login":"vsamy","id":8289611,"avatar_url":"https://avatars.githubusercontent.com/u/8289611?v=3","gravatar_id":"","url":"https://api.github.com/users/vsamy","html_url":"https://github.com/vsamy","followers_url":"https://api.github.com/users/vsamy/followers","following_url":"https://api.github.com/users/vsamy/following{/other_user}","gists_url":"https://api.github.com/users/vsamy/gists{/gist_id}","starred_url":"https://api.github.com/users/vsamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsamy/subscriptions","organizations_url":"https://api.github.com/users/vsamy/orgs","repos_url":"https://api.github.com/users/vsamy/repos","events_url":"https://api.github.com/users/vsamy/events{/privacy}","received_events_url":"https://api.github.com/users/vsamy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-04T15:51:56Z","updated_at":"2016-10-06T13:06:13Z","closed_at":null,"body":"Hi guys,\r\n\r\nSo 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.\r\n\r\nFirst the program:\r\n```\r\nimport numpy as np\r\nimport time\r\n\r\nnp.random.seed(0)\r\nn = 56\r\nA = np.asarray(np.random(n,n))\r\nb = np.eye(A.shape[0])\r\nwhile True:\r\n               c = np.linalg.solve(A, b)\r\n               time.sleep(1e-2)\r\n```\r\n\r\nHere is what shows htop:\r\n![htop](https://cloud.githubusercontent.com/assets/8289611/19081494/c52c2788-8a5a-11e6-9cb1-2610a9f33494.png)\r\n\r\nI am running under ubuntu 16.04.1.\r\nKernel version: 4.4.0-38-generic\r\nPython version: 2.7.12\r\nNumpy version: 1.11.0\r\n\r\nTesting it on ubuntu 14.04 with older version of python (2.7.6) and numpy (1.8) seems to work fine.\r\n\r\nAny help would be appreciated :)"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/251955699","html_url":"https://github.com/numpy/numpy/issues/8120#issuecomment-251955699","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8120","id":251955699,"user":{"login":"vsamy","id":8289611,"avatar_url":"https://avatars.githubusercontent.com/u/8289611?v=3","gravatar_id":"","url":"https://api.github.com/users/vsamy","html_url":"https://github.com/vsamy","followers_url":"https://api.github.com/users/vsamy/followers","following_url":"https://api.github.com/users/vsamy/following{/other_user}","gists_url":"https://api.github.com/users/vsamy/gists{/gist_id}","starred_url":"https://api.github.com/users/vsamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsamy/subscriptions","organizations_url":"https://api.github.com/users/vsamy/orgs","repos_url":"https://api.github.com/users/vsamy/repos","events_url":"https://api.github.com/users/vsamy/events{/privacy}","received_events_url":"https://api.github.com/users/vsamy/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T13:06:13Z","updated_at":"2016-10-06T13:06:13Z","body":"It is a good thing to use multiple threads but getting all the cpu ressources seem a little bit extreme.\r\nThis chunk of code should be running in parallel to another bigger code which **must** run fast enough.\r\n\r\nNumpy has been installed through a classic apt-get. Here is the output:\r\n```\r\nlapack_info:\r\n    libraries = ['lapack', 'lapack']\r\n    library_dirs = ['/usr/lib']\r\n    language = f77\r\nlapack_opt_info:\r\n    libraries = ['lapack', 'lapack', 'blas', 'blas']\r\n    library_dirs = ['/usr/lib']\r\n    language = c\r\n    define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]\r\nopenblas_lapack_info:\r\n  NOT AVAILABLE\r\nblas_info:\r\n    libraries = ['blas', 'blas']\r\n    library_dirs = ['/usr/lib']\r\n    define_macros = [('HAVE_CBLAS', None)]\r\n    language = c\r\natlas_3_10_blas_threads_info:\r\n  NOT AVAILABLE\r\natlas_threads_info:\r\n  NOT AVAILABLE\r\natlas_3_10_threads_info:\r\n  NOT AVAILABLE\r\natlas_blas_info:\r\n  NOT AVAILABLE\r\natlas_3_10_blas_info:\r\n  NOT AVAILABLE\r\natlas_blas_threads_info:\r\n  NOT AVAILABLE\r\nopenblas_info:\r\n  NOT AVAILABLE\r\nblas_mkl_info:\r\n  NOT AVAILABLE\r\nblas_opt_info:\r\n    libraries = ['blas', 'blas']\r\n    library_dirs = ['/usr/lib']\r\n    language = c\r\n    define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]\r\natlas_info:\r\n  NOT AVAILABLE\r\natlas_3_10_info:\r\n  NOT AVAILABLE\r\nlapack_mkl_info:\r\n  NOT AVAILABLE\r\nmkl_info:\r\n  NOT AVAILABLE\r\n ```"}}
{"actor":{"display_login":"vsamy"}}