Title: Installing Slycot (openmp) breaks numpy · Issue #230 · python-control/Slycot · GitHub
Open Graph Title: Installing Slycot (openmp) breaks numpy · Issue #230 · python-control/Slycot
X Title: Installing Slycot (openmp) breaks numpy · Issue #230 · python-control/Slycot
Description: After installing slycot in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix. I narrowed the issue down to the following: slycot from conda-forge depends on libflang >=5.0.0,<6.0.0.a0 ...
Open Graph Description: After installing slycot in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix. I narrowed the issue down to the following: slycot from conda-forg...
X Description: After installing slycot in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix. I narrowed the issue down to the following: slycot from conda-forg...
Opengraph URL: https://github.com/python-control/Slycot/issues/230
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Installing Slycot (openmp) breaks numpy","articleBody":"After installing slycot in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix.\r\n\r\nI narrowed the issue down to the following:\r\n- slycot from conda-forge depends on libflang \u003e=5.0.0,\u003c6.0.0.a0\r\n- libflang 5.0.0 depends on openmp 5.0.0\r\n- openmp 5.0.0 overwrites \"libiomp5md.dll\" that was installed by numpy. The two dlls are very different in size (2mb for the numpy one, 600kb for the openmp one)\r\n\r\nOpenmp places its \"libiomp5md.dll\" in Library\\bin.\r\nThe version from numpy is either in Library\\bin (channel main) or directly in bin (conda-forge).\r\n\r\n### Actual Behavior\r\n\r\nUsing numpy.linalg.solve on singular matrix with dimension over 149 crashes the Kernel.\r\n\r\n### Expected Behavior\r\n\r\nExpected a \"LinAlgError: Singular matrix\" as it is shown with matrices up to the dimension of 149. \r\n\r\n### Steps to Reproduce\r\n\r\n- Create a new conda environment with python 3.11, numpy (and ipython for convenience)\r\n - `mamba create -n slycot_crash python=3.11 numpy ipython -c conda-forge`\r\n- activate the environment\r\n - `mamba activate slycot_crash`\r\n- enter ipython\r\n - `ipython`\r\n- paste and run the code below to confirm it works as expected (raises LinAlgError)\r\n- exit ipython\r\n - `exit`\r\n- install openmp=5\r\n - `mamba install openmp=5 -c conda-forge`\r\n- enter ipython and run the code below again to confirm kernel crash\r\n- (optional) change n=149 and it only fails if the size is 150 or larger\r\n\r\n```\r\nimport numpy as np\r\n\r\nn = 150\r\nA = np.random.rand(n,n)\r\nA[-1,:] = np.zeros((1,n)) # make matrix singular\r\n\r\nb = np.random.rand(n)\r\n\r\nx = np.linalg.solve(A, b)\r\n```","author":{"url":"https://github.com/chnce","@type":"Person","name":"chnce"},"datePublished":"2024-01-26T09:32:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/230/Slycot/issues/230"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6987b4aa-806c-49e8-8167-f1a2011b375a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9502:2846F6:2B3D43E:39EBD7C:697AD309 |
| html-safe-nonce | 8b1cd81eea1fedd35de252e82410dac935039d4941079c6443183fb7ec1261b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTAyOjI4NDZGNjoyQjNENDNFOjM5RUJEN0M6Njk3QUQzMDkiLCJ2aXNpdG9yX2lkIjoiMzg2Njk2NTQxMDA2MjE5MzQxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7732d8416bcad87474e10df505950cc5742d7c92aa609b6bf3de1037a4bf0dd1 |
| hovercard-subject-tag | issue:2101884350 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-control/Slycot/230/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f20d3097790342e690a0e18796e8c5a775c9859ba3357388cc954aca460eaf82/python-control/Slycot/issues/230 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f20d3097790342e690a0e18796e8c5a775c9859ba3357388cc954aca460eaf82/python-control/Slycot/issues/230 |
| og:image:alt | After installing slycot in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix. I narrowed the issue down to the following: slycot from conda-forg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chnce |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4af1ba0e68200258a80b0c5ab34f12a78bf48372a377a11e14eb668863c03b3a |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/Slycot git https://github.com/python-control/Slycot.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 66001480 |
| octolytics-dimension-repository_nwo | python-control/Slycot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 66001480 |
| octolytics-dimension-repository_network_root_nwo | python-control/Slycot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 353b231ffaec2de44db15b2e82887804ede7c21e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width