Hi Gabriel,

I can confirm some problems with eigs on OSX. Seems with each call one gets 
one of the eigenvalues/eigenvectors of T, but not necessarily the largest 
one:

julia> T
3x3 Array{Float64,2}:
 0.9  0.05  0.05
 0.8  0.1   0.1 
 0.7  0.1   0.2

julia> eig(T)
([1.0,0.170711,0.0292893],
3x3 Array{Float64,2}:
 -0.57735  -0.0873799   0.0282726
 -0.57735   0.3371     -0.908743 
 -0.57735   0.937405    0.416397 )

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.57735+0.0im
 0.57735+0.0im
 0.57735+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.0873799+0.0im
   -0.3371+0.0im
 -0.937405+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.57735+0.0im
 0.57735+0.0im
 0.57735+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 -0.57735+0.0im
 -0.57735+0.0im
 -0.57735+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.57735+0.0im
 0.57735+0.0im
 0.57735+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 -0.57735+0.0im
 -0.57735+0.0im
 -0.57735+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.0873799+0.0im
   -0.3371+0.0im
 -0.937405+0.0im

julia> d,v,nconv = eigs(T,nev=1,which=:LM); v
3x1 Array{Complex{Float64},2}:
 0.0282726+0.0im
 -0.908743+0.0im
  0.416397+0.0im


Unfortunately I don't have an older version of Julia at hand to test if 
this is a regression. I don't think that this behavior is correct and it 
would be great if you could file an issue. 

Regarding your second question I would say it depends on the details of 
your problem (size, sparsity, symmetries, ...), but eigs appears to be a 
reasonable starting point.

Best,

Alex.

Reply via email to