JuliaLinearAlgebra / AlgebraicMultigrid.jl

Algebraic Multigrid in Julia
Other
117 stars 23 forks source link

Cannot create Solver on Win32 #53

Closed jagot closed 5 years ago

jagot commented 5 years ago

First of all, I'd like to express my appreciation for the very nice preconditioners! They are almost magic, bringing down the number of iterations required to solve Poisson's problem from almost maxiter to about 5!

I discovered the following error when testing my package on AppVeyor, which also tests on Win32:

MethodError: no method matching AlgebraicMultigrid.Solver(::AlgebraicMultigrid.Classical{Float64}, ::AlgebraicMultigrid.RS, ::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, ::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, ::Int32, ::Int32)
Closest candidates are:
  AlgebraicMultigrid.Solver(::S, ::T, ::P, ::PS, !Matched::Int64, !Matched::Int64) where {S, T, P, PS} at C:\Users\appveyor\.julia\packages\AlgebraicMultigrid\xJj9G\src\classical.jl:2

The reason is that max_levels and max_coarse are hard-coded to be Int64: https://github.com/JuliaLinearAlgebra/AlgebraicMultigrid.jl/blob/master/src/classical.jl#L6 Shouldn't Int be enough?

ranjanan commented 5 years ago

Int should be enough. Can you please submit a PR?