-
Notifications
You must be signed in to change notification settings - Fork 0
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
Non-deterministic coloring? #21
Comments
Even more surprising, it's the same with matrix from files: julia> using MatrixMarket
julia> MatrixMarket.mmwrite("J.mtx", J)
julia> for i in 1:10
println(maximum(get_colors(ColPackPartialColoring("J.mtx", "COLUMN_PARTIAL_DISTANCE_TWO", "NATURAL"))))
end
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
22
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
23
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
22
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
20
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
22
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
24
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
23
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
23
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
22
Found file J.mtx
Graph of Market Market type: [matrix coordinate real general]
22 |
I just checked that the command line interface of ColPack consistently returns a coloring with 19 colors for that setup, so the problem lies with our Julia - C++ bindings |
I checked with the PR #22 and I confirm: using ColPack, SparseArrays, StableRNGs
using MatrixMarket
J = sprand(StableRNG(63), 100, 200, 0.04)
MatrixMarket.mmwrite("./myfile.mtx", J)
for i in 1:10
colpack("./myfile.mtx", "ROW_PARTIAL_DISTANCE_TWO", "NATURAL")
end
for i in 1:10
colpack("./myfile.mtx", "COLUMN_PARTIAL_DISTANCE_TWO", "NATURAL")
end
for i in 1:10
obj = ColPackPartialColoring(J, "ROW_PARTIAL_DISTANCE_TWO", "NATURAL")
ncolors(obj) |> println
end
for i in 1:10
obj = ColPackPartialColoring(J, "COLUMN_PARTIAL_DISTANCE_TWO", "NATURAL")
ncolors(obj) |> println
end |
What do you confirm? That the binary is deterministic and we screwed up somewhere else in the interface? |
Yes, I did something wrong in the C interface. |
Is there an explanation for coloring to be non-deterministic with the natural order?
The text was updated successfully, but these errors were encountered: