Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot switch to openblas, outdated #106

Closed
1 task done
bnavigator opened this issue Oct 18, 2023 · 18 comments
Closed
1 task done

cannot switch to openblas, outdated #106

bnavigator opened this issue Oct 18, 2023 · 18 comments
Labels

Comments

@bnavigator
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Trying to investigate python-control/Slycot#219, I am unable to install openblas:

(plichim) C:\Users\benji>mamba install "libblas=*=*openblas

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.4.2) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['libblas=[build=*openblas]']

conda-forge/win-64                                          Using cache
conda-forge/noarch                                          Using cache

Pinned packages:
  - python 3.12.*


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, 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;
   │        └─ libflang 5.0.0, which cannot be installed (as previously explained);
   └─ libblas 3.8.0 would require
      └─ openblas 0.3.5.* , which does not exist (perhaps a missing channel).

vc is available as >= 14.1

Installed packages

# packages in environment at C:\Users\benji\miniforge3\envs\plichim:
#
# Name                    Version                   Build  Channel
brotli                    1.1.0                hcfcfb64_1    conda-forge
brotli-bin                1.1.0                hcfcfb64_1    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
clang                     17.0.2               h3dc180e_0    conda-forge
clang-17                  17.0.2          default_heb8d277_0    conda-forge
clangxx                   17.0.2          default_heb8d277_0    conda-forge
compiler-rt               17.0.2               h91493d7_1    conda-forge
compiler-rt_win-64        17.0.2               h91493d7_1    conda-forge
contourpy                 1.1.1           py312h0d7def4_1    conda-forge
control                   0.9.4              pyhd8ed1ab_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
fonttools                 4.43.1          py312he70551f_0    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
intel-openmp              2023.2.0         h57928b3_50496    conda-forge
kiwisolver                1.4.5           py312h0d7def4_1    conda-forge
lcms2                     2.15                 h67d730c_3    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libblas                   3.9.0              19_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_1    conda-forge
libbrotlidec              1.1.0                hcfcfb64_1    conda-forge
libbrotlienc              1.1.0                hcfcfb64_1    conda-forge
libcblas                  3.9.0              19_win64_mkl    conda-forge
libdeflate                1.19                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libflang                  17.0.2               h63175ca_0    conda-forge
libhwloc                  2.9.3           default_haede6df_1009    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              19_win64_mkl    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libsqlite                 3.43.2               hcfcfb64_0    conda-forge
libtiff                   4.6.0                h6e2ebb7_2    conda-forge
libwebp-base              1.3.2                hcfcfb64_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.11.5               hc3477c8_1    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
matplotlib-base           3.8.0           py312h26ecaf7_2    conda-forge
mkl                       2023.2.0         h6a75c08_50496    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
numpy                     1.26.0          py312h8753938_0    conda-forge
openjpeg                  2.5.0                h3d672ee_3    conda-forge
openssl                   3.1.3                hcfcfb64_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pillow                    10.1.0          py312he768995_0    conda-forge
pip                       23.3               pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
python                    3.12.0          h2628c8c_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
scipy                     1.11.3          py312h8753938_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
slycot                    0.5.4           py312h4e6a437_1    conda-forge
tbb                       2021.10.0            h91493d7_1    conda-forge
tk                        8.6.13               hcfcfb64_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hdcecf7f_17    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

(plichim) C:\Users\benji>conda info

     active environment : plichim
    active env location : C:\Users\benji\miniforge3\envs\plichim
            shell level : 2
       user config file : C:\Users\benji\.condarc
 populated config files : C:\Users\benji\miniforge3\.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\Users\benji\miniforge3  (writable)
      conda av data dir : C:\Users\benji\miniforge3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\benji\miniforge3\pkgs
                          C:\Users\benji\.conda\pkgs
                          C:\Users\benji\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\benji\miniforge3\envs
                          C:\Users\benji\.conda\envs
                          C:\Users\benji\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False
@bnavigator bnavigator added the bug label Oct 18, 2023
@isuruf
Copy link
Member

isuruf commented Oct 18, 2023

You have some dependency requiring MKL in your environment which makes it impossible to switch to OpenBLAS.

@isuruf isuruf closed this as completed Oct 18, 2023
@isuruf
Copy link
Member

isuruf commented Oct 18, 2023

Try creating a new environment and figure out the package that requires MKL and make an issue on that package's feedstock about supporting OpenBLAS too.

@bnavigator
Copy link
Author

I am struggling with the tooling, but I am fairly certain, that the culprit is libopenblas depending on really old libflang 5.0.0, just as my initial post already indicates:

(sly_py311) C:\Users\benji>conda list
# packages in environment at C:\Users\benji\miniforge3\envs\sly_py311:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
libblas                   3.9.0           19_win64_openblas    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libflang                  5.0.0           h6538335_20180525    conda-forge
libopenblas               0.3.24          pthreads_hc140b1d_0    conda-forge
libsqlite                 3.43.2               hcfcfb64_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
openmp                    5.0.0                    vc14_1    conda-forge
openssl                   3.1.3                hcfcfb64_0    conda-forge
pip                       23.3               pyhd8ed1ab_0    conda-forge
python                    3.11.6          h2628c8c_0_cpython    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               hcfcfb64_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hdcecf7f_17    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
(sly_py311) C:\Users\benji>mamba repoquery depends -t libopenblas

Executing the query libopenblas



libopenblas[0.3.24]
  ├─ libflang[5.0.0]
  │  ├─ openmp[5.0.0]
  │  │  ├─ llvm-meta[5.0.0]
  │  │  └─ vc[14.3]
  │  │     └─ vc14_runtime[14.36.32532]
  │  │        └─ ucrt[10.0.22621.0]
  │  └─ vc already visited
  ├─ vc already visited
  ├─ vc14_runtime already visited
  └─ ucrt already visited

from win-64/libopenblas-0.3.24-pthreads_hc140b1d_0.conda

{
  "arch": "x86_64",
  "build": "pthreads_hc140b1d_0",
  "build_number": 0,
  "constrains": [
    "openblas >=0.3.24,<0.3.25.0a0"
  ],
  "depends": [
    "libflang >=5.0.0,<6.0.0.a0",
    "ucrt >=10.0.20348.0",
    "vc >=14.2,<15",
    "vc14_runtime >=14.29.30139"
  ],
  "license": "BSD-3-Clause",
  "name": "libopenblas",
  "platform": "win",
  "subdir": "win-64",
  "timestamp": 1693789835449,
  "version": "0.3.24"
}
(sly_py311) C:\Users\benji>mamba repoquery depends -t slycot -c conda-forge

Executing the query slycot

warning  libmamba Cache file "C:\\Users\\benji\\miniforge3\\pkgs\\cache\\5afe41e9.json" was modified by another program
warning  libmamba Cache file "C:\\Users\\benji\\miniforge3\\pkgs\\cache\\09cdf8bf.json" was modified by another program
conda-forge/noarch                                  12.2MB @   5.1MB/s  2.4s
conda-forge/win-64                                  19.2MB @   6.7MB/s  2.9s


slycot[0.5.4]
  ├─ libblas[3.9.0]
  │  └─ libopenblas[0.3.24]
  │     ├─ libflang[5.0.0]
  │     │  ├─ openmp[5.0.0]
  │     │  │  ├─ llvm-meta[5.0.0]
  │     │  │  └─ vc[14.3]
  │     │  │     └─ vs2015_runtime[14.36.32532]
  │     │  │        └─ vc14_runtime[14.36.32532]
  │     │  │           └─ ucrt[10.0.22621.0]
  │     │  └─ vc >>> NOT FOUND <<<
  │     ├─ vc already visited
  │     ├─ vc14_runtime already visited
  │     └─ ucrt already visited
  ├─ vc already visited
  ├─ vs2015_runtime already visited
  ├─ ucrt already visited
  ├─ libcblas[3.9.0]
  │  └─ libblas already visited
  ├─ libflang[17.0.2]
  │  ├─ vc already visited
  │  ├─ vc14_runtime already visited
  │  ├─ ucrt already visited
  │  └─ compiler-rt[17.0.2]
  │     ├─ vc already visited
  │     ├─ vc14_runtime already visited
  │     ├─ ucrt already visited
  │     ├─ clang[17.0.2]
  │     │  ├─ clang-17[17.0.2]
  │     │  │  ├─ vc already visited
  │     │  │  ├─ vc14_runtime already visited
  │     │  │  ├─ ucrt already visited
  │     │  │  ├─ libzlib[1.2.13]
  │     │  │  │  ├─ vc already visited
  │     │  │  │  ├─ vc14_runtime already visited
  │     │  │  │  └─ ucrt already visited
  │     │  │  └─ zstd[1.5.5]
  │     │  │     ├─ vc already visited
  │     │  │     ├─ vc14_runtime already visited
  │     │  │     ├─ ucrt already visited
  │     │  │     └─ libzlib already visited
  │     │  ├─ libzlib already visited
  │     │  └─ zstd already visited
  │     ├─ clangxx[17.0.2]
  │     │  ├─ clang already visited
  │     │  ├─ libzlib already visited
  │     │  └─ zstd already visited
  │     └─ compiler-rt_win-64[17.0.2]
  │        ├─ clang already visited
  │        └─ clangxx already visited
  ├─ liblapack[3.9.0]
  │  └─ libblas already visited
  ├─ numpy[1.26.0]
  │  ├─ libblas already visited
  │  ├─ vc already visited
  │  ├─ vc14_runtime already visited
  │  ├─ ucrt already visited
  │  ├─ libcblas already visited
  │  ├─ liblapack already visited
  │  ├─ python[3.9.18]
  │  │  ├─ vc already visited
  │  │  ├─ vc14_runtime already visited
  │  │  ├─ libzlib already visited
  │  │  ├─ bzip2[1.0.8]
  │  │  │  └─ vc already visited
  │  │  ├─ libffi[3.4.2]
  │  │  │  ├─ vc already visited
  │  │  │  └─ vs2015_runtime already visited
  │  │  ├─ libsqlite[3.43.2]
  │  │  │  ├─ vc already visited
  │  │  │  ├─ vc14_runtime already visited
  │  │  │  └─ ucrt already visited
  │  │  ├─ openssl[3.1.3]
  │  │  │  ├─ vc already visited
  │  │  │  ├─ vc14_runtime already visited
  │  │  │  ├─ ucrt already visited
  │  │  │  └─ ca-certificates[2016.2.28]
  │  │  ├─ tk[8.6.13]
  │  │  │  ├─ vc already visited
  │  │  │  ├─ vc14_runtime already visited
  │  │  │  └─ ucrt already visited
  │  │  ├─ tzdata[2020a]
  │  │  ├─ xz[5.2.6]
  │  │  │  ├─ vc already visited
  │  │  │  └─ vs2015_runtime already visited
  │  │  └─ pip[10.0.1]
  │  │     ├─ python[2.7.15]
  │  │     │  ├─ vc >>> NOT FOUND <<< already visited
  │  │     ├─ setuptools[23.0.0]
  │  │     │  └─ python already visited
  │  │     ├─ wheel[0.29.0]
  │  │     │  ├─ python already visited
  │  │     │  └─ setuptools already visited
  │  │     ├─ solvable:prereqmarker >>> NOT FOUND <<<
  │  │     └─ python[2.7.12]
  │  │        ├─ vc >>> NOT FOUND <<< already visited
  │  │        └─ vs2008_runtime[9.0.30729.6161]
  │  └─ python_abi[3.9]
  ├─ python[3.10.9]
  │  ├─ vc already visited
  │  ├─ vs2015_runtime already visited
  │  ├─ libzlib already visited
  │  ├─ bzip2 already visited
  │  ├─ libffi already visited
  │  ├─ libsqlite already visited
  │  ├─ openssl already visited
  │  ├─ tk already visited
  │  ├─ tzdata already visited
  │  ├─ xz already visited
  │  └─ pip already visited
  └─ python_abi[3.10]

@jakirkham
Copy link
Member

jakirkham commented Oct 18, 2023

Could you please try with a fresh env that just installs openblas (and nothing else)?

Edit: If that works, then can try layering other things on top to find when the issue shows up

@bnavigator
Copy link
Author

That is exactly what I did in my last comment.

@jakirkham
Copy link
Member

It looks like the last comment does some inspection of the environment and packages generally. Not seeing where a fresh environment was created. Maybe I'm missing something

Would suggest pulling that into a fresh comment or editing the previous comment to call that out more. In particular am looking for a conda create call followed by info about that new environment

@bnavigator
Copy link
Author


(base) C:\Users\benji>mamba create -n minimalopenblas

Looking for: []

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

     $ mamba activate minimalopenblas

To deactivate an active environment, use

     $ mamba deactivate


(base) C:\Users\benji>mamba activate minimalopenblas

(minimalopenblas) C:\Users\benji>mamba install openblas

Looking for: ['openblas']

conda-forge/noarch                                  12.3MB @   4.9MB/s  2.5s
conda-forge/win-64                                  19.3MB @   5.9MB/s  3.2s
Transaction

  Prefix: C:\Users\benji\miniforge3\envs\minimalopenblas

  Updating specs:

   - openblas


  Package              Version  Build                Channel           Size
-----------------------------------------------------------------------------
  Install:
-----------------------------------------------------------------------------

  + ucrt          10.0.22621.0  h57928b3_0           conda-forge     Cached
  + vc14_runtime   14.36.32532  hdcecf7f_17          conda-forge     Cached
  + vc                    14.3  h64f974e_17          conda-forge     Cached
  + llvm-meta            5.0.0  0                    conda-forge     Cached
  + openmp               5.0.0  vc14_1               conda-forge     Cached
  + libflang             5.0.0  h6538335_20180525    conda-forge     Cached
  + libopenblas         0.3.24  pthreads_hc140b1d_0  conda-forge     Cached
  + openblas            0.3.24  pthreads_h3721920_0  conda-forge      167kB

  Summary:

  Install: 8 packages

  Total download: 167kB

-----------------------------------------------------------------------------


Confirm changes: [Y/n]
openblas                                           167.0kB @ 799.7kB/s  0.2s

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(minimalopenblas) C:\Users\benji>mamba list
# packages in environment at C:\Users\benji\miniforge3\envs\minimalopenblas:
#
# Name                    Version                   Build  Channel
libflang                  5.0.0           h6538335_20180525    conda-forge
libopenblas               0.3.24          pthreads_hc140b1d_0    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
openblas                  0.3.24          pthreads_h3721920_0    conda-forge
openmp                    5.0.0                    vc14_1    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hdcecf7f_17    conda-forge

(minimalopenblas) C:\Users\benji>conda install "libflang>=11"
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using 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 vc14_runtime conflicts for:
libflang[version='>=11'] -> vc[version='>=14.2,<15'] -> vc14_runtime[version='>=14.16.27033|>=14.28.29325|>=14.32.31332|>=14.36.32532|>=14.34.31931']
openmp -> vc[version='>=14,<15.0a0'] -> vc14_runtime[version='>=14.16.27033|>=14.28.29325|>=14.32.31332|>=14.36.32532|>=14.34.31931|>=14.29.30139']
libopenblas -> vc14_runtime[version='>=14.29.30139']
libopenblas -> vc[version='>=14.2,<15'] -> vc14_runtime[version='>=14.16.27033|>=14.28.29325|>=14.32.31332|>=14.36.32532|>=14.34.31931']
libflang[version='>=11'] -> vc14_runtime[version='>=14.29.30139']
openblas -> vc14_runtime[version='>=14.29.30139']
openblas -> vc[version='>=14.2,<15'] -> vc14_runtime[version='>=14.16.27033|>=14.28.29325|>=14.32.31332|>=14.36.32532|>=14.34.31931']
vc14_runtime
vc -> vc14_runtime[version='>=14.16.27033|>=14.28.29325|>=14.32.31332|>=14.36.32532|>=14.34.31931|>=14.29.30139']

Package ucrt conflicts for:
libflang[version='>=11'] -> ucrt[version='>=10.0.20348.0']
ucrt
libopenblas -> ucrt[version='>=10.0.20348.0']
vc14_runtime -> ucrt[version='>=10.0.20348.0']
vc -> vc14_runtime[version='>=14.36.32532'] -> ucrt[version='>=10.0.20348.0']
openblas -> ucrt[version='>=10.0.20348.0']

Package llvm-meta conflicts for:
openmp -> llvm-meta[version='5.0.0|5.0.0.*|6.0.0|6.0.0.*|6.0.1|6.0.1.*|7.0.0|7.0.0.*']
llvm-meta

Package vc conflicts for:
openmp -> vc[version='14.*|>=14,<15.0a0']
libopenblas -> libflang[version='>=5.0.0,<6.0.0.a0'] -> vc==14
openblas -> vc[version='14|>=14,<15.0a0|>=14.1,<15.0a0|>=14.1,<15|>=14.2,<15']
libopenblas -> vc[version='>=14,<15.0a0|>=14.1,<15.0a0|>=14.1,<15|>=14.2,<15']
libflang[version='>=11'] -> vc[version='>=14.1,<15.0a0|>=14.2,<15']
openmp -> llvm-openmp==8.0.1=h1ad3211_0 -> vc[version='>=14.1,<15.0a0']
libflang[version='>=11'] -> llvm-openmp[version='>=11.0.1'] -> vc[version='>=14.1,<15']
vc

Package openmp conflicts for:
openmp
openblas -> libflang[version='>=5.0.0,<6.0.0.a0'] -> openmp==5.0.0
libopenblas -> libflang[version='>=5.0.0,<6.0.0.a0'] -> openmp==5.0.0

Package libopenblas conflicts for:
openblas -> libopenblas[version='0.3.10|0.3.10|0.3.10|0.3.10|0.3.10|0.3.10|0.3.12|0.3.12|0.3.13|0.3.15|0.3.15|0.3.16|0.3.17|0.3.17|0.3.18|0.3.20|0.3.20|0.3.21|0.3.21|0.3.21|0.3.21|0.3.23|0.3.24|0.3.9|0.3.8|0.3.7|0.3.7|0.3.7|0.3.7|0.3.7|0.3.7|0.3.7|0.3.7|0.3.6|0.3.6|0.3.6|0.3.6',build='h29e5d5d_6|h29e5d5d_1|h29e5d5d_3|hcfe7411_4|hcfe7411_5|hcfe7411_7|hcfe7411_0|hc8a65f3_0|pthreads_h1662909_1|pthreads_h1662909_2|pthreads_h1662909_3|pthreads_h1662909_1|pthreads_hc469a61_1|pthreads_hc469a61_0|pthreads_h02691f0_0|pthreads_hc140b1d_3|pthreads_hc140b1d_0|pthreads_h02691f0_2|pthreads_h02691f0_1|pthreads_hc469a61_1|pthreads_hc469a61_0|pthreads_hc469a61_0|pthreads_hc469a61_0|pthreads_hc469a61_1|pthreads_hc469a61_0|pthreads_hc469a61_0|pthreads_h1662909_0|pthreads_h1662909_5|pthreads_h1662909_4|hcfe7411_0|hcfe7411_6|h29e5d5d_2|h29e5d5d_0|h29e5d5d_5|h29e5d5d_4|h29e5d5d_3']
libopenblas

Package libflang conflicts for:
libflang[version='>=11']
openblas -> libflang[version='<6.0.0.a0|>=5.0.0|>=5.0.0,<6.0.0.a0']
libopenblas -> libflang[version='<6.0.0.a0|>=5.0.0|>=5.0.0,<6.0.0.a0']

Package llvm-openmp conflicts for:
openblas -> libflang[version='>=5.0.0'] -> llvm-openmp[version='11.0.1|>=11.0.1']
libflang[version='>=11'] -> llvm-openmp[version='11.0.1|>=11.0.1']
openmp -> llvm-openmp[version='8.0.0|8.0.0|8.0.1',build='h1ad3211_1|h1ad3211_0|h1ad3211_0']
libopenblas -> libflang[version='>=5.0.0'] -> llvm-openmp[version='11.0.1|>=11.0.1']


(minimalopenblas) C:\Users\benji>

@bnavigator
Copy link
Author

The difference between the envs in sly_py311 and minimalopenblas is that in the former I did mamba install "libblas=*=*openblas", which apparently installs a little bit more than mamba install openblas. But the error is the same.

@h-vetinari
Copy link
Member

conda install "libflang>=11"

It's your assumption that this is the reason for the original problem, and I don't think that's the case. Everything we have for openblas on windows is using libflang 5.

From your initial environment: try if you can do without clang/compiler-rt etc. flang now exists in LLVM 17 and having clang 17 might easily lead the solver astray.

@bnavigator
Copy link
Author

bnavigator commented Oct 19, 2023

Everything we have for openblas on windows is using libflang 5.

And that is the reason. Why do you do that? It certainly was not the case 2 years ago, otherwise I could never have added conda-forge/slycot-feedstock@debd212

Edit: Strike the last statement. We stopped trying to make Slycot work with openblas on Windows a log time ago.

@h-vetinari
Copy link
Member

Why do you do that?

Because there was no usable newer flang until very recently.

But you shouldn't have to concern yourself with flang at all. Just using blas / lapack as host deps should be enough, or if you need to compile Fortran code {{ compiler("fortran") }}.

@bnavigator
Copy link
Author

Unfortunately that only seems to be true when compiling it inside a feedstock:

When I do plain {{ compiler("fortran") }} on github actions, I get this:

bnavigator/Slycot@5bdeb13

requirements:
  build:
    - {{ compiler('fortran') }}
    - {{ compiler('c') }}
    - cmake >=3.14
    - make  # [linux]

  host:
    # Always build against NETLIB ('Generic') LAPACK/Blas
    # https://conda-forge.org/docs/maintainer/knowledge_base.html#blas
    - libblas
    - libcblas
    - liblapack
    - python
    - numpy >=1.19,!=1.23.0
    - pip
    - scikit-build >=0.15
    - setuptools >=45
    - setuptools_scm >=7

  run:
    - python {{ PY_VER }}
    - {{ pin_compatible('numpy') }}
Mamba failed to solve:
 - cmake >=3.14
 - gfortran_win-64
 - vs2017_win-64

with channels:

The reported errors are:
- Encountered problems while solving:
-   - nothing provides requested gfortran_win-[64](https://github.com/bnavigator/Slycot/actions/runs/6572749788/job/17854568919#step:4:65)
- 

Leaving build/test directories:
  Work:
 C:\Miniconda3\envs\build-env\conda-bld\work 
  Test:
 C:\Miniconda3\envs\build-env\conda-bld\test_tmp 
Leaving build/test environments:
  Test:
source activate  C:\Miniconda3\envs\build-env\conda-bld\_test_env 
  Build:
source activate  C:\Miniconda3\envs\build-env\conda-bld\_build_env 


    solution = solver.solve_for_action(_specs, prefix)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Miniconda3\envs\build-env\Lib\site-packages\boa\core\solver.py", line 244, in solve_for_action
    t = self.solve(specs)
        ^^^^^^^^^^^^^^^^^
  File "C:\Miniconda3\envs\build-env\Lib\site-packages\boa\core\solver.py", line 234, in solve
    raise RuntimeError("Solver could not find solution." + error_string)
RuntimeError: Solver could not find solution.Mamba failed to solve:
 - cmake >=3.14
 - gfortran_win-64
 - vs2017_win-64

with channels:

The reported errors are:
- Encountered problems while solving:
-   - nothing provides requested gfortran_win-64
-

@h-vetinari
Copy link
Member

h-vetinari commented Oct 19, 2023

If you're using our compilers out of our infrastructure, then you're pretty much on your own. In particular, you'll have to at least ensure you do something equivalent to our migrations and global pinning in your local conda_build_config.yaml. For example, the vs2017 that shows up in your logs is long out of use in conda-forge.

@bnavigator
Copy link
Author

Sorry, I am very confused here. Are you saying that using the conda/mamba tools with a strict conda-forge channel pinning and adhering to the docs, like https://conda-forge.org/docs/maintainer/knowledge_base.html, is not supported outside of any feedstock CI build?

I am pretty sure that I do not pin to vs2017 anwhere. I have posted the requirements of the recipe above. Beyond that there is just this:

# build-env.yml
name: build-env
dependencies:
  - conda-build
  - numpy !=1.23.0

And the github actions workflow:

- name: Setup Conda
        uses: conda-incubator/setup-miniconda@v2
        with:
          python-version: ${{ matrix.python }}
          activate-environment: build-env
          environment-file: .github/conda-env/build-env.yml
          miniforge-version: latest
          miniforge-variant: Mambaforge
          channel-priority: strict
          auto-update-conda: false
          auto-activate-base: false
      - name: Conda build
        shell: bash -l {0}
        run: |
          set -e
          numpyversion=$(python -c 'import numpy; print(numpy.version.version)')
          conda build --python "${{ matrix.python }}" --numpy $numpyversion conda-recipe

@h-vetinari
Copy link
Member

Are you saying that using the conda/mamba tools with a strict conda-forge channel pinning and adhering to the docs, like https://conda-forge.org/docs/maintainer/knowledge_base.html, is not supported outside of any feedstock CI build?

Using packaged artefacts is obviously supported, though the compilers are a different story. Some people do use them, but there are not a lot of guard-rails, and quite a few pitfalls.

But you're not just using conda install, you want conda build, and there you're missing a lot of the setup that the feedstocks do to make things work. You'll likely need to copy the global pinning into your local conda_build_config.yaml, at the very least the compiler configuration. For example, the fact that your build is looking for gfortran_win-64 is a sure sign that the following bits are missing:

fortran_compiler:              # [unix or win64]
  - gfortran                   # [linux64 or (osx and x86_64)]
  - gfortran                   # [aarch64 or ppc64le or armv7l or s390x]
  - flang                      # [win64]

I don't know what your usecase is for wanting to build your package with conda in your CI - if it's to ensure compatibility with the conda recipe, then this can be done, but is non-trivial. Arrow does so, for example, but what they've done essentially is copy over the build scripts and configuration from the feedstock (including e.g. the .ci_support files), lightly edited for their needs, and then invoke that. This also requires regularly syncing back changes from the feedstock to your CI.

There are long-term plans for other people to be able to hook into our build & migration infrastructure, but at the moment that's pretty much the status quo.

@jakirkham
Copy link
Member

Our compilers do see a fair bit of usage on Linux & macOS where they work pretty well

The Windows story is a bit rougher since it often requires some kind of Visual Studio install (or in some cases the CLI tools from Visual Studio can work)

@h-vetinari
Copy link
Member

Our compilers do see a fair bit of usage on Linux & macOS where they work pretty well

That's true, though so far not explicitly documented as supported. I guess by Hyrum's law we're already "condemned" to support it, unless we really want to put our foot down (which is probably neither necessary nor worth it in this instance). There's an issue to come up with (or at least document) a policy around that.

@bnavigator
Copy link
Author

Our compilers do see a fair bit of usage on Linux & macOS where they work pretty well

Which is ironic, because those platforms have a decent compiler and tooling infrastructure on their own. The strength of conda is to provide that infrastructure to the python world on Windows.

Using packaged artefacts is obviously supported, though the compilers are a different story. Some people do use them, but there are not a lot of guard-rails, and quite a few pitfalls.

But you're not just using conda install, you want conda build, and there you're missing a lot of the setup that the feedstocks do to make things work. You'll likely need to copy the global pinning into your local conda_build_config.yaml, at the very least the compiler configuration.

Thank you for this explanation. I was not aware that documentation like https://docs.conda.io/projects/conda-build/en/stable/resources/compiler-tools.html does not 100% apply to conda-forge.

We do indeed build Slycot in our CI in order to make sure that users can use Slycot with conda-forge as well as build it on their own. Obviously the current recipe does not do that with 100% correct assumptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants