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

BoundsError in perm_greedy_color #112

Closed
diegozea opened this issue Mar 3, 2022 · 1 comment
Closed

BoundsError in perm_greedy_color #112

diegozea opened this issue Mar 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@diegozea
Copy link

diegozea commented Mar 3, 2022

BoundsError in perm_greedy_color, I think the problem is the initialization of the cols vector using undef (see the index value in the screen capture). The error happens most of the time, but not always. Here there is an example:

image

You can reproduce it by running:

using GraphRecipes, Plots
using Graphs
using LinearAlgebra
n = 5
adjmat = rand(0:1, n, n)
g = SimpleGraph(Symmetric(adjmat))
c = Graphs.degree_greedy_color(g)

Version information

     From worker 11:   Julia Version 1.6.2
     From worker 11:	Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
     From worker 11:	Platform Info:
     From worker 11:	  OS: Linux (x86_64-pc-linux-gnu)
     From worker 11:	  CPU: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
     From worker 11:	  WORD_SIZE: 64
     From worker 11:	  LIBM: libopenlibm
     From worker 11:	  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
     From worker 11:	Environment:
     From worker 11:	  JULIA_REVISE_WORKER_ONLY = 1
      From worker 11:         Status `/tmp/jl_buYAIX/Project.toml`
      From worker 11:	  [bd48cda9] GraphRecipes v0.5.9
      From worker 11:	  [86223c79] Graphs v1.6.0
      From worker 11:	  [91a5bcdd] Plots v1.25.11
      From worker 11:	  [37e2e46d] LinearAlgebra
      From worker 11:	  [44cfe95a] Pkg
@diegozea diegozea added the bug Something isn't working label Mar 3, 2022
etiennedeg added a commit to etiennedeg/Graphs.jl that referenced this issue Mar 3, 2022
@etiennedeg
Copy link
Member

A graph should not have self loops when considering coloring. We should error when it is the case.

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

No branches or pull requests

2 participants