Open chnce opened 10 months ago
Why are you installing openmp=5
at all? This has been replaced by llvm-openmp
for a long time. The slycot issue also didn't provide a reason why v5.
The unfortunate reality is that some windows bits in conda-forge still rely on llvm-openmp 5, but that'll hopefully change soon, because llvm/flang 18 should now be ready to take over the fortran side.
Installing openmp=5 directly is only a shortcut to reproduce the issue. Originally I only installed slycot. Slycot has libflang 5 as a dependency which then has openmp 5 as dependency.
slycot
{
"arch": "x86_64",
"build": "py311h3fb5059_4",
"build_number": 4,
"depends": [
"libblas >=3.9.0,<4.0a0",
"libcblas >=3.9.0,<4.0a0",
"libflang >=5.0.0,<6.0.0.a0",
"liblapack >=3.9.0,<4.0a0",
"numpy >=1.23.5,<2.0a0",
"python >=3.11,<3.12.0a0",
"python_abi 3.11.* *_cp311",
"ucrt >=10.0.20348.0",
"vc >=14.2,<15",
"vc14_runtime >=14.29.30139"
],
"license": "GPL-2.0-only",
"license_family": "GPL",
"name": "slycot",
"platform": "win",
"subdir": "win-64",
"timestamp": 1701634917193,
"version": "0.5.4"
}
libflang
{
"arch": "x86_64",
"build": "h6538335_20180525",
"build_number": 20180525,
"depends": [
"openmp 5.0.0",
"vc >=14,<15.0a0"
],
"license": "Apache 2.0",
"name": "libflang",
"platform": "win",
"subdir": "win-64",
"timestamp": 1527899216421,
"track_features": "flang",
"version": "5.0.0"
}
Yeah, the libflang 5 issue is for stuff on windows compiled with our ancient flang. As soon as we've got the shiny new llvm-flang 18 in conda-forge, I'm planning to give https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/1359 another shot.
should the numpy
recipe then have a run_constrained
blocking the openmp
package from getting installed together?
Solution to issue cannot be found in the documentation.
Issue
The original issue was filed here: https://github.com/python-control/Slycot/issues/230
After installing libflang 5 in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix.
Flang 5 is pinned as the default Fortran compiler across conda-forge. conda_build_config.yaml
I narrowed the issue down to the following:
Openmp places its "libiomp5md.dll" in Library\bin. The version from numpy is either in Library\bin (channel main) or directly in bin (conda-forge).
Actual Behavior
Using numpy.linalg.solve on singular matrix with dimension over 149 crashes the Kernel.
Expected Behavior
Expected a "LinAlgError: Singular matrix" as it is shown with matrices up to the dimension of 149.
Steps to Reproduce
mamba create -n slycot_crash python=3.11 numpy ipython -c conda-forge
mamba activate slycot_crash
ipython
exit
mamba install openmp=5 -c conda-forge
Installed packages
Environment info