JuliaLinearAlgebra / AlgebraicMultigrid.jl

Algebraic Multigrid in Julia
Other
117 stars 22 forks source link

Displaying the MultiLevel object result in an error (no method matching round(::Float64, ::Int64)) #51

Closed Alexander-Barth closed 5 years ago

Alexander-Barth commented 5 years ago

Displaying the MultiLevel object result in an error. The Base.show seems to contain some code Julia 0.6 not jet ported to julia 0.7.

using AlgebraicMultigrid
A = poisson(1000);
ml = ruge_stuben(A);
display(ml)

The fix is easy and I will make a PR.

ERROR: MethodError: no method matching round(::Float64, ::Int64)
Closest candidates are:
  round(::Float64, ::RoundingMode{:Nearest}) at float.jl:368
  round(::Float64, ::RoundingMode{:Up}) at float.jl:366
  round(::Float64, ::RoundingMode{:Down}) at float.jl:364
  ...
Stacktrace:
 [1] show(::IOContext{REPL.Terminals.TTYTerminal}, ::AlgebraicMultigrid.MultiLevel{AlgebraicMultigrid.Pinv{Float64},GaussSeidel{SymmetricSweep},GaussSeidel{SymmetricSweep},SparseMatrixCSC{Float64,Int64},Adjoint{Float64,SparseMatrixCSC{Float64,Int64}},SparseMatrixCSC{Float64,Int64},AlgebraicMultigrid.MultiLevelWorkspace{Array{Float64,1},1}}) at ./printf.jl:159
 [2] show(::IOContext{REPL.Terminals.TTYTerminal}, ::MIME{Symbol("text/plain")}, ::AlgebraicMultigrid.MultiLevel{AlgebraicMultigrid.Pinv{Float64},GaussSeidel{SymmetricSweep},GaussSeidel{SymmetricSweep},SparseMatrixCSC{Float64,Int64},Adjoint{Float64,SparseMatrixCSC{Float64,Int64}},SparseMatrixCSC{Float64,Int64},AlgebraicMultigrid.MultiLevelWorkspace{Array{Float64,1},1}}) at ./sysimg.jl:194
 [3] display(::REPL.REPLDisplay, ::MIME{Symbol("text/plain")}, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:131
 [4] display(::REPL.REPLDisplay, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:135
 [5] display(::Any) at ./multimedia.jl:287
 [6] top-level scope at none:0
ranjanan commented 5 years ago

Closed by #52

kbarros commented 5 years ago

This seems like an important bug fix. Should a new version be released to the Julia package registry?

ranjanan commented 5 years ago

Sure, https://github.com/JuliaLang/METADATA.jl/pull/22552