Open ax3l opened 1 year ago
Currently, the CF scipy build on Windows unconditionally builds against MKL (for blas & lapack)
That is not true. We build against reference LAPACK, and you can switch it out in your environment as you please. I just tried[^1]
mamba create -n test scipy python=3.12 libblas=*=*blis
mamba create -n test scipy python=3.12 libblas=*=*mkl
mamba create -n test scipy python=3.12 libblas=*=*netlib
mamba create -n test scipy python=3.12 libblas=*=*openblas
and they all resolve without issue.
If you're trying to combine specifically openblas
with llvm-openmp
, you're going to run into the fact that we have no llvm-openmp builds of openblas on windows, but are stuck with an old libflang that's incompatible:
mamba create -n test scipy python=3.12 libblas=*=*openblas clang llvm-openmp
Looking for: ['scipy', 'python=3.12', 'libblas=[build=*openblas]', 'clang', 'llvm-openmp']
conda-forge/win-64 Using cache
conda-forge/noarch Using cache
Could not solve for environment specs
The following packages are incompatible
├─ libblas * *openblas is installable with the potential options
│ ├─ libblas 3.8.0 would require
│ │ └─ openblas 0.3.6 h828a276_2, which does not exist (perhaps a missing channel);
│ ├─ libblas [3.8.0|3.9.0] would require
│ │ ├─ libopenblas [0.3.10 hc8a65f3_0|0.3.12 pthreads_h1662909_0|...|0.3.9 hcfe7411_0], which requires
│ │ │ └─ libflang [<6.0.0.a0 |>=5.0.0,<6.0.0.a0 ] with the potential options
│ │ │ ├─ libflang 5.0.0 would require
│ │ │ │ └─ openmp 5.0.0 , which can be installed;
│ │ │ └─ libflang 5.0.0 would require
│ │ │ └─ vc 14 , which does not exist (perhaps a missing channel);
│ │ └─ openblas >=0.3.6,<0.3.7.0a0 , which requires
│ │ └─ libflang <6.0.0.a0 with the potential options
│ │ ├─ libflang 5.0.0, which can be installed (as previously explained);
│ │ └─ libflang 5.0.0, which cannot be installed (as previously explained);
That work (openblas+llvm-openmp) was waiting for a very long time on https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/1359, which itself needed a stable flang (that we've all been waiting for for even longer).
We now have flang 17, but that's still pretty experimental (and only used here out of necessity). I'm hoping that by flang 18 at the beginning of next year, we'll be able to roll it out as our fortran compiler on windows more generally.
CC @isuruf
[^1]: python=3.12 is not necessary, but just to force the solver to definitely pick the builds post-#255
Thank you for the guidance!
Do you know what blas/lapack to pick on Windows to avoid incompatibility with llvm-openmp
?
Do you know what blas/lapack to pick on Windows to avoid incompatibility with
llvm-openmp
?
Neither blis nor netlib conflict
mamba create -n test scipy python=3.12 llvm-openmp libblas=*=*blis ✅
mamba create -n test scipy python=3.12 llvm-openmp libblas=*=*mkl ❌ # resolves but has both {intel,llvm}-openmp
mamba create -n test scipy python=3.12 llvm-openmp libblas=*=*netlib ✅
mamba create -n test scipy python=3.12 llvm-openmp libblas=*=*openblas ❌
Thank you! I'll give that a try in https://github.com/conda-forge/impactx-feedstock/pull/23 :)
can this be closed @ax3l ?
Solution to issue cannot be found in the documentation.
Issue
Currently, the CF scipy build on Windows unconditionally builds against MKL (for blas & lapack).
mkl
has a hard dependency onintel-openmp
, which means downstream projects that use scipy cannot usellvm-openmp
withclang-cl
anymore if they pull in scipy (even if only at runtime).https://conda-forge.org/docs/maintainer/knowledge_base.html#blas https://github.com/conda-forge/intel_repack-feedstock/issues/59
Is it possible to provide an alternative to depending on MKL for windows builds?
Installed packages
Environment info