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

Windows conda packages default to 2.5.1 #38

Closed
SiddhaSharma opened this issue Aug 19, 2022 · 11 comments
Closed

Windows conda packages default to 2.5.1 #38

SiddhaSharma opened this issue Aug 19, 2022 · 11 comments

Comments

@SiddhaSharma
Copy link

Problem Description
Error while reading YAML files involving third-body reactions on Cantera v2.6.0 on mac OS.

Steps to reproduce

  1. Compile and run 'mech.yaml' (attached) on macOS Cantera v2.6.0. (Cantera using conda-forge channel in this case)
  2. See the error: 'undeclared duplicate reactions detected.'
  3. *The error goes away when I use Cantera v2.5.1.
  4. *To fix it one can add 'duplicate: true' in the reactions with error. Then the YAML file won't compile on Cantera version 2.5.1 and will give the error: 'No duplicate found for declared duplicate reaction number abc'.
  5. ** The error is not present on the Windows system with Cantera v2.6.0.

System information

  • Cantera version: v2.6.0
  • OS: [MacOS Monterey v12.5]
  • Python

Attachments
mech.yaml.zip

@bryanwweber
Copy link
Member

The error is not present on the Windows system with Cantera v2.6.0.

This is very confusing. How did you install Cantera on both platforms?

@SiddhaSharma
Copy link
Author

SiddhaSharma commented Aug 22, 2022

I understand this is very confusing. I used conda on both OS. For windows I had WSL2. The only difference I can recall is the channels that I used. But if channels were an issue then I shouldn't be seeing the error on macOS with Cantera 2.5.1 and 2.6.0

@ischoegl
Copy link
Member

ischoegl commented Aug 22, 2022

Ok. I believe I can shed some light on this here.

  1. the macOS version is installed from conda-forge
  2. the Windows version is not available from conda-forge, and needs to be installed from the cantera channel instead

Testing on a windows machine yields the following:

$ conda create -y -n ct-test
$ conda activate ct-test
$ conda install -c channel cantera cantera
$ python
[...]
>>> import cantera as ct
>>> ct.__version__
'2.5.1'

which means that you were inadvertently using 2.5.1 on Windows. I am transferring this to https://github.com/Cantera/conda-recipes ...

PS: while the 2.6.0 packages for windows do exist (see https://anaconda.org/Cantera/cantera/files?channel=main), it is 2.5.1 that is installed by default

$ conda list
# packages in environment at C:\Users\ischo\miniconda3\envs\ct-test:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl
ca-certificates           2022.07.19           haa95532_0
cantera                   2.5.1            py39hb2e0c1f_0    cantera
certifi                   2022.6.15        py39haa95532_0
h5py                      3.7.0            py39h3de5c98_0
hdf5                      1.10.6               h1756f20_1
icc_rt                    2019.0.0             h0cc432a_1
intel-openmp              2021.4.0          haa95532_3556
mkl                       2021.4.0           haa95532_640
mkl-service               2.4.0            py39h2bbff1b_0
mkl_fft                   1.3.1            py39h277e83a_0
mkl_random                1.2.2            py39hf11a4ad_0
numpy                     1.23.1           py39h7a0a035_0
numpy-base                1.23.1           py39hca35cd5_0
openssl                   1.1.1q               h2bbff1b_0
pip                       22.1.2           py39haa95532_0
python                    3.9.12               h6244533_0
ruamel_yaml               0.15.100         py39h2bbff1b_0
setuptools                63.4.1           py39haa95532_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.39.2               h2bbff1b_0
tzdata                    2022a                hda174b7_0
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wheel                     0.37.1             pyhd3eb1b0_0
wincertstore              0.2              py39haa95532_2
yaml                      0.2.5                he774522_0
zlib                      1.2.12               h8cc25b3_2 

@ischoegl ischoegl transferred this issue from Cantera/cantera Aug 22, 2022
@bryanwweber
Copy link
Member

bryanwweber commented Aug 23, 2022

Thanks for investigating @ischoegl Is this a duplicate of #29 then? The outcome seems to be the same, is the cause the same?

@ischoegl
Copy link
Member

ischoegl commented Aug 23, 2022

Is this a duplicate of #29 then? The outcome seems to be the same, is the cause the same?

I don't think so. In #29, the 2.6.0 version is installed correctly (on ubuntu 20.04), with MKL being broken. Here, it appears that conda still defaults to 2.5.1 on Windows, despite 2.6.0 being the current 'stable' release.

@bryanwweber
Copy link
Member

Thanks, I misinterpreted then...

@SiddhaSharma the resolution on macOS (and with 2.6.0 generally) is that you need to mark these reactions, see Cantera/cantera#1278 and also if you search on the Google group you can find some threads

@ischoegl
Copy link
Member

ischoegl commented Aug 23, 2022

At the moment, forcing version 2.6 works for Windows (thanks for the prompt, @bryanwweber)

(ct-forge) PS C:\Users\ischo> conda install -c cantera cantera=2.6.0
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: done

## Package Plan ##

  environment location: C:\Users\ischo\miniconda3\envs\ct-forge

  added / updated specs:
    - cantera=2.6.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cantera-2.6.0              |   py39h29588fb_0         3.5 MB  cantera
    libcantera-2.6.0           |       h82bb817_0        32.4 MB  cantera
    ------------------------------------------------------------
                                           Total:        35.8 MB

The following NEW packages will be INSTALLED:

  blas               pkgs/main/win-64::blas-1.0-mkl
  cantera            cantera/win-64::cantera-2.6.0-py39h29588fb_0
  h5py               pkgs/main/win-64::h5py-3.7.0-py39h3de5c98_0
  hdf5               pkgs/main/win-64::hdf5-1.10.6-h1756f20_1
  icc_rt             pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
  intel-openmp       pkgs/main/win-64::intel-openmp-2021.4.0-haa95532_3556
  libcantera         cantera/win-64::libcantera-2.6.0-h82bb817_0
  mkl                pkgs/main/win-64::mkl-2021.4.0-haa95532_640
  mkl-service        pkgs/main/win-64::mkl-service-2.4.0-py39h2bbff1b_0
  mkl_fft            pkgs/main/win-64::mkl_fft-1.3.1-py39h277e83a_0
  mkl_random         pkgs/main/win-64::mkl_random-1.2.2-py39hf11a4ad_0
  numpy              pkgs/main/win-64::numpy-1.23.1-py39h7a0a035_0
  numpy-base         pkgs/main/win-64::numpy-base-1.23.1-py39hca35cd5_0
  ruamel.yaml        pkgs/main/win-64::ruamel.yaml-0.16.12-py39h2bbff1b_1
  ruamel.yaml.clib   pkgs/main/win-64::ruamel.yaml.clib-0.2.0-py39h2bbff1b_0
  six                pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
  zlib               pkgs/main/win-64::zlib-1.2.12-h8cc25b3_2


Proceed ([y]/n)? y


Downloading and Extracting Packages
libcantera-2.6.0     | 32.4 MB   | ############################################################################ | 100%
cantera-2.6.0        | 3.5 MB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
(ct-forge) PS C:\Users\ischo> python
Python 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cantera as ct
>>> ct.__version__
'2.6.0'

PS: mamba appears to work without having to force, i.e.

(ct-forge) PS C:\Users\ischo> mamba install -c cantera cantera

@SiddhaSharma
Copy link
Author

SiddhaSharma commented Aug 23, 2022

Thank you @bryanwweber @ischoegl. I am also concerned about the all-around use of YAML mechanism I have been working on. My file works fine, but with Cantera 2.6.0 it shows an error. After correcting the error with "duplicate: true" the file doesn't run on 2.5.1. So when I share or publish my work I need to specifically mention that the file won't run on Cantera 2.6.0
Also, I don't have my windows system with me for this week. I can re-confirm my Cantera version for consistency then.

@ischoegl
Copy link
Member

@SiddhaSharma … the differences you are seeing between 2.5.1 and 2.6.0 are known and expected. As @bryanwweber pointed out:

… the resolution on macOS (and with 2.6.0 generally) is that you need to mark these reactions, see Cantera/cantera#1278 and also if you search on the Google group you can find some threads

@ischoegl ischoegl changed the title Error while reading YAML file when using v2.6.0 on mac system Windows conda packages default to 2.5.1 Aug 27, 2022
@SiddhaSharma
Copy link
Author

@ischoegl Thank you for the clarification.

@speth
Copy link
Member

speth commented Aug 24, 2023

With the release of Cantera 3.0.0 and the corresponding updates to the cantera channel packages, this issue of getting an obsolete package version on Windows is gone. From a Windows command prompt:

conda create -n ct-test -c defaults -c cantera cantera
conda activate ct-test
python -c "import cantera; print(cantera.__version__)"

This prints 3.0.0, as expected. And, for posterity, the full list of packages installed is:

  blas               pkgs/main/win-64::blas-1.0-mkl
  bzip2              pkgs/main/win-64::bzip2-1.0.8-he774522_0
  ca-certificates    pkgs/main/win-64::ca-certificates-2023.05.30-haa95532_0
  cantera            cantera/win-64::cantera-3.0.0-py311h859585b_1
  hdf5               pkgs/main/win-64::hdf5-1.12.1-h51c971a_3
  icc_rt             pkgs/main/win-64::icc_rt-2022.1.0-h6049295_2
  intel-openmp       pkgs/main/win-64::intel-openmp-2023.1.0-h59b6b97_46319
  libcantera         cantera/win-64::libcantera-3.0.0-h82bb817_1
  libffi             pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
  mkl                pkgs/main/win-64::mkl-2023.1.0-h6b88ed4_46357
  mkl-service        pkgs/main/win-64::mkl-service-2.4.0-py311h2bbff1b_1
  mkl_fft            pkgs/main/win-64::mkl_fft-1.3.6-py311hf62ec03_1
  mkl_random         pkgs/main/win-64::mkl_random-1.2.2-py311hf62ec03_1
  numpy              pkgs/main/win-64::numpy-1.25.2-py311hdab7c0b_0
  numpy-base         pkgs/main/win-64::numpy-base-1.25.2-py311hd01c5d8_0
  openssl            pkgs/main/win-64::openssl-3.0.10-h2bbff1b_2
  pip                pkgs/main/win-64::pip-23.2.1-py311haa95532_0
  python             pkgs/main/win-64::python-3.11.4-he1021f5_0
  ruamel.yaml        pkgs/main/win-64::ruamel.yaml-0.17.21-py311h2bbff1b_0
  setuptools         pkgs/main/win-64::setuptools-68.0.0-py311haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
  tbb                pkgs/main/win-64::tbb-2021.8.0-h59b6b97_0
  tk                 pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2023c-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/win-64::wheel-0.38.4-py311haa95532_0
  xz                 pkgs/main/win-64::xz-5.4.2-h8cc25b3_0
  zlib               pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0

@speth speth closed this as completed Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants