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

Commands not defined using latest Julia and Oscar versions (downloaded < 3 weeks ago) #2612

Closed
lizcarlson opened this issue Aug 1, 2023 · 8 comments · Fixed by kalmarek/PermutationGroups.jl#33
Labels
bug Something isn't working

Comments

@lizcarlson
Copy link

Hi everyone, I am attempting to solve a partition problem and was very happy to see that Julia can do this in one line using the Oscar package. So, to make sure everything worked, I begin to run the test example, and indeed I simplified it to the following two lines of code.

using Oscar
partitions(100, [1,2,5,10,20,50], [2,2,2,2,2,2])

The resulting error is

ERROR: UndefVarError: partitions not defined.

So, in other words, this is a bug. I get a similar error when I try to use the command "getindex_safe".

Here is my version info:
OSCAR version 0.11.3
combining:
AbstractAlgebra.jl v0.27.10
GAP.jl v0.9.7
Hecke.jl v0.17.5
Nemo.jl v0.32.7
Polymake.jl v0.9.2
Singular.jl v0.16.1
building on:
Antic_jll v0.201.500+0
Arb_jll v200.2300.0+0
Calcium_jll v0.401.100+0
FLINT_jll v200.900.7+0
GAP_jll v400.1200.200+5
Singular_jll v403.101.500+0
libpolymake_julia_jll v0.9.2+0
libsingular_julia_jll v0.29.0+0
polymake_jll v400.900.0+0
See ]st -m for a full list of dependencies.

Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin22.4.0)
CPU: 16 × Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 1 on 16 virtual cores
Official https://julialang.org/ release

Apologies if this is a known issue, I just didn't see it in the Github and though I would make sure this was known and if there was a simple solution. If I need to install and older version of Julia and/or Oscar for things to work, I am happy to do so, thanks.

@lizcarlson lizcarlson added the bug Something isn't working label Aug 1, 2023
@benlorenz
Copy link
Member

benlorenz commented Aug 1, 2023

JuLie (which contains the partition related code) was merged into Oscar in version 0.12.0 which was released Apr 17. So either your registry was not up to date or there is something else in your julia environment that is holding the Oscar version back at 0.11.3. The current version 0.12.1 was released on May 29, about 2 month ago.
Please check the Pkg status:

]st --outdated --manifest

Edit:
With a fresh installation of Oscar:

(@v1.9) pkg> activate --temp
  Activating new project at `/tmp/jl_cbkJDb`

(jl_cbkJDb) pkg> add Oscar
<...>

julia> using Oscar
 -----    -----    -----      -      -----   
|     |  |     |  |     |    | |    |     |  
|     |  |        |         |   |   |     |  
|     |   -----   |        |     |  |-----   
|     |        |  |        |-----|  |   |    
|     |  |     |  |     |  |     |  |    |   
 -----    -----    -----   -     -  -     -  

...combining (and extending) ANTIC, GAP, Polymake and Singular
Version 0.12.1 ... 
 ... which comes with absolutely no warranty whatsoever
Type: '?Oscar' for more information
(c) 2019-2023 by The OSCAR Development Team

julia> partitions(100, [1,2,5,10,20,50], [2,2,2,2,2,2])
6-element Vector{Partition{Int64}}:
 [50, 50]
 [50, 20, 20, 10]
 [50, 20, 20, 5, 5]
 [50, 20, 10, 10, 5, 5]
 [50, 20, 20, 5, 2, 2, 1]
 [50, 20, 10, 10, 5, 2, 2, 1]

@lizcarlson
Copy link
Author

Well that is strange, it must be something more sinister then, because I just added Oscar yesterday. After updating everything I could using the "update" command in the pkg environment, this is the output I have for the ]st --outdated --manifest

⌃ [14f7f29c] AMD v0.5.0 (<v0.5.1)
⌅ [c3fe647b] AbstractAlgebra v0.27.10 (<v0.31.0): Hecke, Nemo, Oscar, PermutationGroups, Singular
⌃ [66b61cbe] AlgebraicSolving v0.3.3 (<v0.3.4)
⌃ [944b1d66] CodecZlib v0.7.1 (<v0.7.2)
⌃ [34da2185] Compat v4.7.0 (<v4.8.0)
⌅ [3e1990a7] Hecke v0.17.5 (<v0.19.13): Oscar
⌃ [f4abf1af] MultivariateMoments v0.4.3 (<v0.4.4)
⌃ [102ac46a] MultivariatePolynomials v0.5.0 (<v0.5.1)
⌅ [2edaba10] Nemo v0.32.7 (<v0.35.3): Hecke, Oscar, Singular
⌃ [bac558e1] OrderedCollections v1.6.0 (<v1.6.2)
⌃ [f1435218] Oscar v0.11.3 (<v0.12.1)
⌃ [69de0a69] Parsers v2.7.1 (<v2.7.2)
⌅ [d720cf60] Polymake v0.9.2 (<v0.11.2): Oscar
⌃ [27ebfcd6] Primes v0.5.3 (<v0.5.4)
⌃ [8e049039] SemialgebraicSets v0.3.1 (<v0.3.2)
⌅ [bcd08a7b] Singular v0.16.1 (<v0.18.8): Oscar
⌃ [1e83bf80] StaticArraysCore v1.4.0 (<v1.4.2)
⌃ [858aa9a9] SymbolicWedderburn v0.3.5 (<v0.3.6)
⌅ [1b915085] WinReg v0.3.1 (<v1.0.0): Mosek
⌅ [ba154793] GAP_pkg_juliainterface_jll v0.800.202+4 (<v0.800.300+0): GAP
⌅ [656ef2d0] OpenBLAS32_jll v0.3.21+0 (<v0.3.23+0): julia
⌅ [458c3c95] OpenSSL_jll v1.1.21+0 (<v3.0.9+0): MongoC_jll
⌅ [83958c19] Perl_jll v5.34.0+2 (<v5.34.1+0): polymake_jll
⌅ [43d676ae] Singular_jll v403.101.500+0 (<v403.204.400+0): Singular, libsingular_julia_jll
⌅ [28df3c45] boost_jll v1.76.0+1 (<v1.79.0+0): SCIP_jll, polymake_jll
⌅ [4d8266f6] libpolymake_julia_jll v0.9.2+0 (<v0.10.3+0): Polymake
⌅ [ae4fbd8f] libsingular_julia_jll v0.29.0+0 (<v0.36.0+0): Singular
⌅ [7c209550] polymake_jll v400.900.0+0 (<v400.1000.1+0): libpolymake_julia_jll

The only packages I can update using the update command are:
PermutationGroups GroupsCore Test JuMP MosekTools DelimitedFiles LinearAlgebra
COSMO SumOfSquares Oscar DynamicPolynomials AbstractAlgebra MATLAB Dualization
Mosek SymbolicWedderburn MultivariateBases

I am not sure what dependency is holding up Oscar, is it obvious to you? Thanks.

@benlorenz
Copy link
Member

The key packages in that output are those were something required by Oscar is held back by something that does not belong to the Oscar packages. In this case I noticed:

⌅ [c3fe647b] AbstractAlgebra v0.27.10 (<v0.31.0): Hecke, Nemo, Oscar, PermutationGroups, Singular

The package PermutationGroups.jl, last release October 2022, needs (according to its Project.toml):

AbstractAlgebra = "0.22 - 0.27"

So you need to remove this package from the environment to upgrade Oscar. You might also want to have a look at some documentation regarding how to use different project environments, e.g. https://pkgdocs.julialang.org/v1/environments/.

@lizcarlson
Copy link
Author

lizcarlson commented Aug 1, 2023

I don't need PermutationGroups, this was something I thought I would need at one point and don't. So I deleted it, updated everything by just running the command "update", and Oscar was still out of date. I was not aware of the Project.toml's, so I went and investigated those. Nothing else in Oscar's Project.toml I had explicitly downloaded, so, removing and re-adding Oscar, I received the following output:

   Resolving package versions...
    Updating `~/.julia/environments/v1.9/Project.toml`
⌃ [f1435218] + Oscar v0.11.3
    Updating `~/.julia/environments/v1.9/Manifest.toml`
⌃ [66b61cbe] + AlgebraicSolving v0.3.3
  [f01c122e] + BinaryWrappers v0.1.2
  [1f15a43c] + CxxWrap v0.13.4
  [55939f99] + DecFP v1.3.2
  [c863536a] + GAP v0.9.7
⌅ [3e1990a7] + Hecke v0.17.5
  [4fe8b98c] + Mongoc v0.9.0
⌅ [2edaba10] + Nemo v0.32.7
⌃ [f1435218] + Oscar v0.11.3
  [fa939f87] + Pidfile v1.3.0
⌅ [d720cf60] + Polymake v0.9.2
  [6c6a2e73] + Scratch v1.2.0
⌅ [bcd08a7b] + Singular v0.16.1
  [ae81ac8f] + ASL_jll v0.1.3+0
  [e21ec000] + Antic_jll v0.201.500+0
  [d9960996] + Arb_jll v200.2300.0+0
  [fcfa6d1b] + Calcium_jll v0.401.100+0
  [47200ebd] + DecFP_jll v2.0.3+1
  [e134572f] + FLINT_jll v200.900.7+0
  [5cd7a574] + GAP_jll v400.1200.200+5
  [de1ad85e] + GAP_lib_jll v400.1201.200+0
⌅ [ba154793] + GAP_pkg_juliainterface_jll v0.800.202+4
  [e8aa6df9] + GLPK_jll v5.0.1+0
  [e33a78d0] + Hwloc_jll v2.9.2+0
  [9cc047cb] + Ipopt_jll v300.1400.1301+0
  [1d63c593] + LLVMOpenMP_jll v15.0.4+0
  [dd4b983a] + LZO_jll v2.10.1+0
  [d00139f3] + METIS_jll v5.1.2+0
  [d7ed1dd3] + MUMPS_seq_jll v500.600.100+0
  [90100e71] + MongoC_jll v1.19.1+0
  [68e3532b] + Ncurses_jll v6.4.1+0
  [76642167] + Ninja_jll v1.11.1+0
⌅ [656ef2d0] + OpenBLAS32_jll v0.3.21+0
⌅ [458c3c95] + OpenSSL_jll v1.1.21+0
  [80dd9cbb] + PPL_jll v1.2.1+0
⌅ [83958c19] + Perl_jll v5.34.0+2
  [05236dd9] + Readline_jll v8.2.1+0
  [e5ac4fe4] + SCIP_jll v800.0.301+0
  [319450e9] + SPRAL_jll v2023.7.4+0
⌅ [43d676ae] + Singular_jll v403.101.500+0
  [36f60fef] + TOPCOM_jll v0.17.8+0
  [3161d3a3] + Zstd_jll v1.5.5+0
  [508c9074] + bliss_jll v0.77.0+1
⌅ [28df3c45] + boost_jll v1.76.0+1
  [f07e07eb] + cddlib_jll v0.94.13+0
  [5558cf25] + cohomCalg_jll v0.32.0+0
  [1493ae25] + lib4ti2_jll v1.6.10+0
  [3eaa8342] + libcxxwrap_julia_jll v0.9.7+3
⌅ [4d8266f6] + libpolymake_julia_jll v0.9.2+0
⌅ [ae4fbd8f] + libsingular_julia_jll v0.29.0+0
  [3873f7d0] + lrslib_jll v0.3.3+0
  [6d01cc9a] + msolve_jll v0.4.9+0
  [55c6dc9b] + nauty_jll v2.6.13+1
  [6690c6e9] + normaliz_jll v300.900.301+0
⌅ [7c209550] + polymake_jll v400.900.0+0
  [fe1e1685] + snappy_jll v1.1.9+1
  [8ba89e20] + Distributed
  [4af54fe1] + LazyArtifacts
  [781609d7] + GMP_jll v6.2.1+2
  [3a97d323] + MPFR_jll v4.1.1+4

In particular, Hecke, Nemo, Singular, GAP, and Polymake are not at the latest versions that Oscar requires, but I never manually installed these. The only packages I believe I have explicitly installed include

JuMP
Mosek
MosekTools
SumOfSquares
SymbolicWedderburn
Dynamic Polynomials
MATLAB
Dualization
GroupsCore
LinearAlgebra
MultivariateBases
Test

If I need PermutationGroups at some point I can add that later in an environment, as you suggest.

So, basically I am using Oscar to efficiently find the basis for an invariant ring, and I would like to solve a couple partition problems. My program will not run without JuMP, Mosek, MosekTools, SymbolicWedderburn, DynamicPolynomials, and LinearAlgebra (I really need MATLAB too, but I can remove that dependency at a later date). I want to emphasize I am NOT an algebraist or combinatorist, so I have been doing my best with what little I have been teaching myself over the last few months. If there is a less software-risky way to do these tasks than using Oscar that occurs to you, please let me know.

@thofma
Copy link
Collaborator

thofma commented Aug 2, 2023

What happens if you do the following?

(@v1.9) pkg> add Oscar@0.12.1

This forces it to install version 0.12.1 and throw an error otherwise.

@lizcarlson
Copy link
Author

lizcarlson commented Aug 2, 2023

This throws the following error

pkg> add Oscar@0.12.1
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PermutationGroups [8bc5a954]:
PermutationGroups [8bc5a954] log:
├─possible versions are: 0.1.1-0.3.3 or uninstalled
├─restricted by compatibility requirements with SymbolicWedderburn [858aa9a9] to versions: 0.3.0-0.3.3
│ └─SymbolicWedderburn [858aa9a9] log:
│ ├─possible versions are: 0.1.0-0.3.6 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions: 0.1.0-0.3.6
└─restricted by compatibility requirements with AbstractAlgebra [c3fe647b] to versions: uninstalled — no versions left
└─AbstractAlgebra [c3fe647b] log:
├─possible versions are: 0.1.0-0.31.0 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions: 0.1.0-0.31.0
└─restricted by compatibility requirements with Oscar [f1435218] to versions: 0.30.7-0.30.9
└─Oscar [f1435218] log:
├─possible versions are: 0.2.0-0.12.1 or uninstalled
└─restricted to versions 0.12.1 by an explicit requirement, leaving only versions: 0.12.1

I think I figured out why. Although I do not need PermutationGroups explicitly, I need SymbolicWedderburn, which apparently uses PermutationGroups under the hood according to its Project.toml file (for me, there is no way of getting around this that I am aware of, because this is the only interface available for symmetry-aware optimization in Julia).

So, I guess I will not be able to use this Oscar command for the time being, and will have to figure out another way. I can probably just try to pull the source code for the partitions command from JuLie.jl then. (I just want to be efficient in an area I am not familiar with, the code I am writing can get bogged down very quickly. The fact that I can do this in Julia is amazing.)

Apologies if this is now a non-Github issue. Please delete the issue if it is off-topic for this forum, and thank you for your help.

@kalmarek
Copy link
Contributor

kalmarek commented Aug 4, 2023

@lizcarlson yes SymbolicWedderburn requires PermutationGroups which depends on old version of AA. A new version 0.3.4 should be up soon.

The next version (0.4) formalizes AbstractPerm interface, implements it and hence drops AA dependency. I didn't have time to thoroughly test it and merge though.

@lgoettgens
Copy link
Member

Fixed by kalmarek/PermutationGroups.jl#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants