Giter VIP home page Giter VIP logo

groebnerbasis.jl's Introduction

GroebnerBasis

Note

This package is now deprecated. You can find all its functionality and many things more in the Computer Algebra System Oscar.jl.

Build Status

This is a julia library which provides an interface between Singular (https://github.com/Singular/Singular) and gb (https://github.com/ederc/gb).

It depends on Singular.jl (https://github.com/oscar-system/Singular.jl) for using Singular in julia.

The package also provides a benchmark suite for various different Groebner basis computations, see Benchmarks.jl.

In Example.jl we provide a small example for how to call the main functions of the package. E.g. in your julia session call

using GroebnerBasis
GroebnerBasis.run_cyclic_8()

This work is partly supported by the DFG Sonderforschungsbereich TRR 195.

groebnerbasis.jl's People

Contributors

ederc avatar fingolfin avatar github-actions[bot] avatar kalmarek avatar rafaeldavidmohr avatar sumiya11 avatar thofma avatar yingboma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

groebnerbasis.jl's Issues

Convert test to use `@testset`

The tests currently use a bunch of functions which call other functions. This would be more naturally modelled using @testset

Random Error running GB.jl

Computation sometimes randomly terminates with an error saying:

__gmpn_addmul_1_coreisbr at /opt/hostedtoolcache/julia/1.6.2/x64/bin/../lib/julia/libgmp.so (unknown line)

I am not sure why it occurs in the first place, but it happens about 1 in 5 times of running the program

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

dyld: Symbol not found: _omp_get_thread_num

I gave GB.jl a spin on my mac and run into the following crash

julia> using Singular, GB

Welcome to Nemo version 0.16.1

Nemo comes with absolutely no warranty whatsoever

[ Info: Recompiling stale cache file /Users/sascha/.julia/compiled/v1.2/Singular/9fz0y.ji for Singular [bcd08a7b-43d2-5ff7-b6d4-c458787f915c]

Welcome to Nemo version 0.16.1

Nemo comes with absolutely no warranty whatsoever

[ Info: Precompiling GB [e39c9192-ea4d-5e15-9584-a488c6d614bd]

Welcome to Nemo version 0.16.1

Nemo comes with absolutely no warranty whatsoever


julia> vars = ["x$i" for i in 1:5]
5-element Array{String,1}:
 "x1"
 "x2"
 "x3"
 "x4"
 "x5"

julia> R, (x1, x2, x3, x4, x5) = Singular.PolynomialRing(
                 Singular.QQ, vars, ordering = :degrevlex)
(Singular Polynomial Ring (QQ),(x1,x2,x3,x4,x5),(dp(5),C,L(1048575)), spoly{n_Q}[x1, x2, x3, x4, x5])

julia> gens = [
               x1+2*x2+2*x3+2*x4+2*x5-1,
               x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1,
               2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2,
               x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3,
               2*x2*x3+2*x1*x4+2*x2*x5-x4
           ]
5-element Array{spoly{n_Q},1}:
 x1+2*x2+2*x3+2*x4+2*x5-1           
 x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1
 2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2 
 x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3    
 2*x2*x3+2*x1*x4+2*x2*x5-x4         

julia> id = Singular.Ideal(R, gens)
Singular Ideal over Singular Polynomial Ring (QQ),(x1,x2,x3,x4,x5),(dp(5),C,L(1048575)) with generators (x1+2*x2+2*x3+2*x4+2*x5-1, x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1, 2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2, x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3, 2*x2*x3+2*x1*x4+2*x2*x5-x4)

julia> GB.f4(id)
dyld: lazy symbol binding failed: Symbol not found: _omp_get_thread_num
  Referenced from: /Users/sascha/.julia/packages/GB/KXk9r/deps/usr/lib/libgb.dylib
  Expected in: flat namespace

dyld: Symbol not found: _omp_get_thread_num
  Referenced from: /Users/sascha/.julia/packages/GB/KXk9r/deps/usr/lib/libgb.dylib
  Expected in: flat namespace


signal (6): Abort trap: 6
in expression starting at REPL[9]:1

signal (6): Abort trap: 6
in expression starting at REPL[9]:1
unknown function (ip: 0x10f46a245)
Allocations: 39745802 (Pool: 39737179; Big: 8623); GC: 87
zsh: abort      julia-1.2

This seems to be fixed by manually loading libomp

julia> using Singular, GB

Welcome to Nemo version 0.16.1

Nemo comes with absolutely no warranty whatsoever

julia> using Libdl

julia> Libdl.dlopen("/usr/local/lib/libomp.dylib")
Ptr{Nothing} @0x00007fe542acd610

julia> vars = ["x$i" for i in 1:5]
5-element Array{String,1}:
 "x1"
 "x2"
 "x3"
 "x4"
 "x5"

julia> R, (x1, x2, x3, x4, x5) = Singular.PolynomialRing(
                 Singular.QQ, vars, ordering = :degrevlex)
(Singular Polynomial Ring (QQ),(x1,x2,x3,x4,x5),(dp(5),C,L(1048575)), spoly{n_Q}[x1, x2, x3, x4, x5])

julia> gens2 = [
               x1+2*x2+2*x3+2*x4+2*x5-1,
               x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1,
               2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2,
               x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3,
               2*x2*x3+2*x1*x4+2*x2*x5-x4
           ]
5-element Array{spoly{n_Q},1}:
 x1+2*x2+2*x3+2*x4+2*x5-1           
 x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1
 2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2 
 x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3    
 2*x2*x3+2*x1*x4+2*x2*x5-x4         

julia> id = Singular.Ideal(R, gens2)
Singular Ideal over Singular Polynomial Ring (QQ),(x1,x2,x3,x4,x5),(dp(5),C,L(1048575)) with generators (x1+2*x2+2*x3+2*x4+2*x5-1, x1^2+2*x2^2+2*x3^2+2*x4^2+2*x5^2-x1, 2*x1*x2+2*x2*x3+2*x3*x4+2*x4*x5-x2, x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3, 2*x2*x3+2*x1*x4+2*x2*x5-x4)

julia> GB.f4(id)
Singular Ideal over Singular Polynomial Ring (QQ),(x1,x2,x3,x4,x5),(dp(5),C,L(1048575)) with generators (x1+2*x2+2*x3+2*x4+2*x5-1, x2^2+2*x1*x3+2*x2*x4+2*x3*x5-x3, 2*x2*x3+2*x1*x4+2*x2*x5-x4, 18*x3*x4+20*x4^2+18*x2*x5+40*x3*x5+66*x4*x5+48*x5^2-x2-4*x3-9*x4-16*x5, 9*x3^2+18*x2*x4-11*x4^2-36*x2*x5-58*x3*x5-84*x4*x5-75*x5^2+x2+4*x3+9*x4+25*x5, 132*x4^2*x5+264*x3*x5^2+576*x4*x5^2+468*x5^3+x4^2-12*x2*x5-46*x3*x5-102*x4*x5-186*x5^2+4*x2+7*x3+9*x4+10*x5, 3960*x2*x4*x5-2880*x2*x5^2-3060*x3*x5^2-2664*x4*x5^2-3672*x5^3-315*x2*x4+115*x4^2-126*x2*x5+356*x3*x5+366*x4*x5+1284*x5^2+19*x2-5*x3-20*x5, 5940*x4^3-11880*x2*x5^2-51840*x3*x5^2-63072*x4*x5^2-60696*x5^3-540*x2*x4-2450*x4^2+3402*x2*x5+9788*x3*x5+10518*x4*x5+25692*x5^2-323*x2-410*x3-990*x4-1820*x5, 5940*x2*x4^2+4320*x2*x5^2+8100*x3*x5^2+11448*x4*x5^2+12744*x5^3-945*x2*x4-175*x4^2-648*x2*x5-1052*x3*x5-1482*x4*x5-4668*x5^2+2*x2+125*x3+315*x4+140*x5, 267696*x4*x5^3+288288*x5^4-10296*x2*x5^2-38544*x3*x5^2-83736*x4*x5^2-153192*x5^3-3300*x2*x4-1310*x4^2+9186*x2*x5+26468*x3*x5+29538*x4*x5+34572*x5^2-323*x2-1250*x3-2880*x4-5180*x5, 24092640*x3*x5^3-7413120*x5^4-645840*x2*x5^2-4397220*x3*x5^2-992952*x4*x5^2+1314144*x5^3+301725*x2*x4+83225*x4^2-603558*x2*x5-2197832*x3*x5-2129262*x4*x5-1023288*x5^2-6193*x2+107645*x3+277470*x4+469640*x5, 12046320*x2*x5^3+4324320*x5^4-1745640*x2*x5^2+704160*x3*x5^2+1054944*x4*x5^2-405288*x5^3+217260*x2*x4-105710*x4^2-380754*x2*x5-375076*x3*x5-695496*x4*x5-900084*x5^2+44971*x2+57430*x3+48645*x4+184900*x5, 13154581440*x5^5-5665168080*x5^4+1297146240*x2*x5^2+3240457380*x3*x5^2+4317438672*x4*x5^2+3524076036*x5^3+16132995*x2*x4+150670610*x4^2-126613962*x2*x5-416572598*x3*x5-531245148*x4*x5-1154748822*x5^2+2569523*x2+1390160*x3+9049545*x4+40771070*x5)

GB in infinite loop (?)

julia> using Singular, GB
julia> varnames = ["x$i" for i in 0:2]
3-element Array{String,1}:
 "x0"
 "x1"
 "x2"

julia> R, (x0, x1, x2,) = Singular.PolynomialRing(
                        Singular.QQ, varnames, ordering = :lex)
(Singular Polynomial Ring (QQ),(x0,x1,x2),(lp(3),C), spoly{n_Q}[x0, x1, x2])

julia> my_gens = [x0^3*x2^15+x0*x1*x2+x1^3+x2^12, x0^2*x2^9+x0*x1^2+x1*x2^3, x0^2*x1*x2^5+x0*x2^8+x1^2]
3-element Array{spoly{n_Q},1}:
 x0^3*x2^15+x0*x1*x2+x1^3+x2^12
 x0^2*x2^9+x0*x1^2+x1*x2^3     
 x0^2*x1*x2^5+x0*x2^8+x1^2     

julia> id = Singular.Ideal(R, my_gens)
Singular Ideal over Singular Polynomial Ring (QQ),(x0,x1,x2),(lp(3),C) with generators (x0^3*x2^15+x0*x1*x2+x1^3+x2^12, x0^2*x2^9+x0*x1^2+x1*x2^3, x0^2*x1*x2^5+x0*x2^8+x1^2)

julia> GB.f4(id) # doesn't seem to finish

Tag?

It would be good to get a tag on this so that StaticArrays 1 is allowed as a compat here.

Multi-Modular Groebner Basis Computation

Hi,

I was trying to check msolve functionality of this package and ran into a couple of issues.

  1. I was trying to run a test example for msolve but ran into the following error:
    ERROR: failed process: Process(`/Users/iliailmer/.julia/packages/GroebnerBasis/JI3W4/src/../deps/msolve-binary -v0 -l2 -P0 -m0 -s17 -t 1 -p 64 -f /tmp/in.ms -o /tmp/out.ms`, ProcessExited(126)) [126]
    This is running on macOS 11.2 with Apple M1.

  2. Has multi-modular computation support for Groebner Basis/F4 been added to the package?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.