inaos / iron-array

2 stars 0 forks source link

llvmdev and mkl packages incompatibility in conda envs #619

Closed FrancescAlted closed 2 years ago

FrancescAlted commented 2 years ago

With fresh installs of conda (on MacOSX at least), the next installation process:

$ conda install -c intel mkl-static
$ conda install llvmdev

is raising the next error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package mkl-include conflicts for:
mkl-include
mkl-static -> mkl-include==2022.2.0=intel_8687

Package tbb conflicts for:
mkl-static -> tbb=2021
tbb

Package libcxxabi conflicts for:
tbb -> libcxx[version='>=4.0.1'] -> libcxxabi==4.0.1[build='hcfea43d_1|hebd6815_0']
llvmdev -> libcxx[version='>=4.0.0'] -> libcxxabi==4.0.1[build='hcfea43d_1|hebd6815_0']

Package libcxx conflicts for:
mkl-static -> intel-openmp=2022 -> libcxx[version='>=10.0.0|>=12.0.0']
llvmdev -> libcxx[version='>=10.0.0|>=10.a0|>=12|>=4.0.0|>=4.0.1']
intel-openmp -> libcxx[version='>=12.0.0']
tbb -> libcxx[version='>=10.0.0|>=12.0.0|>=4.0.1']

Package intel-openmp conflicts for:
intel-openmp
mkl-static -> intel-openmp=2022
Note that strict channel priority may have removed packages required for satisfiability.

It looks like Intel (or Anaconda) messed things up. Still trying to find a workaround.

FrancescAlted commented 2 years ago

After several attempts, it looks like conda is responsible for that, as I have found that mamba does not find the dependency issue. So, a workaround is to install things with mamba. First, to install mamba use:

$ conda install mamba -n base -c conda-forge

Then one can use:

$ mamba install 'llvmdev>=13'
$ mamba install -c intel mkl-include
$ mamba install -c intel mkl-static
$ mamba install -c intel icc_rt    # SVML

Also, it is worth noting that one should always use the regular conda channels, and not conda-forge, to install dependencies, specially llvmdev. I have tried with conda-forge a couple of times, but tests using LLVM crash (at least on MacOSX, even forcing mamba install llvmdev<15).

FrancescAlted commented 2 years ago

Added a note in README.md (199896f7). Closing, although maybe in the future we should propagate this to CI scripts.