Skip to content

Commit a7cdb6d

Browse files
authored
Merge pull request #81 from JuliaLinearAlgebra/sf/jll_package
Upgrade to Julia 1.3+, use JLL packages
2 parents 0e738a1 + e320e64 commit a7cdb6d

File tree

7 files changed

+18
-109
lines changed

7 files changed

+18
-109
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.7
8-
- 1.0
7+
- 1.3
98
- nightly
109
notifications:
1110
email: false

Project.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name = "Arpack"
22
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
3-
version = "0.3.2"
3+
version = "0.4.0"
44

55
[deps]
6-
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
6+
Arpack_jll = "68821587-b530-5797-8361-c406ea357684"
77
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99

1010
[compat]
11-
BinaryProvider = "0.5"
12-
julia = "0.7, 1"
11+
Arpack_jll = "~3.5"
12+
julia = "1.3"
1313

1414
[extras]
1515
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -18,4 +18,3 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1818

1919
[targets]
2020
test = ["Random", "SparseArrays", "Test"]
21-

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
environment:
22
matrix:
3-
- julia_version: 0.7
3+
- julia_version: 1.3
44
- julia_version: latest
55

66
platform:

deps/.gitignore

-3
This file was deleted.

deps/build.jl

-74
This file was deleted.

src/Arpack.jl

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
2-
3-
__precompile__(true)
4-
52
"""
63
Arnoldi and Lanczos iteration for computing eigenvalues
74
"""
85
module Arpack
96

10-
# To make Pkg aware that this dependency
11-
# will be injected by BinaryProvider.
12-
using Libdl
13-
14-
const depsfile = joinpath(@__DIR__, "..", "deps", "deps.jl")
15-
16-
if isfile(depsfile)
17-
include(depsfile)
18-
else
19-
throw(ErrorException("""
20-
No deps.jl file could be found. Please try running Pkg.build("Arpack").
21-
Currently, the build command might fail when Julia has been built from source
22-
and the recommendation is to use the official binaries from julialang.org.
23-
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
24-
"""))
25-
end
7+
# Load in our binary dependencies
8+
using Arpack_jll
269

2710
using LinearAlgebra: BlasFloat, BlasInt, Diagonal, I, SVD, UniformScaling,
2811
checksquare, factorize, ishermitian, issymmetric, mul!,

src/libarpack.jl

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

33
import LinearAlgebra: BlasInt
4+
5+
# A convenient shortcut to show unexpected behavior from libarpack
6+
ERR_UNEXPECTED_BEHAVIOR = -999
47
@static if isdefined(LinearAlgebra, :ARPACKException)
58
import LinearAlgebra: ARPACKException
69
else
@@ -18,6 +21,8 @@ else
1821
print(io, string("did not find any eigenvalues to sufficient accuracy. ",
1922
"Try with a different starting vector or more Lanczos vectors ",
2023
"by increasing the value of ncv."))
24+
elseif ex.info == -999
25+
print(io, "Unexepcted behavior")
2126
else
2227
print(io, "unspecified ARPACK error: $(ex.info)")
2328
end
@@ -79,15 +84,15 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
7984
elseif ido[] == 99
8085
break
8186
else
82-
throw(ARPACKException("unexpected behavior"))
87+
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
8388
end
8489
elseif mode == 3 && bmat == "I" # corresponds to dsdrv2, dndrv2 or zndrv2
8590
if ido[] == -1 || ido[] == 1
8691
y[:] = solveSI(x)
8792
elseif ido[] == 99
8893
break
8994
else
90-
throw(ARPACKException("unexpected behavior"))
95+
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
9196
end
9297
elseif mode == 2 # corresponds to dsdrv3, dndrv3 or zndrv3
9398
if ido[] == -1 || ido[] == 1
@@ -101,7 +106,7 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
101106
elseif ido[] == 99
102107
break
103108
else
104-
throw(ARPACKException("unexpected behavior"))
109+
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
105110
end
106111
elseif mode == 3 && bmat == "G" # corresponds to dsdrv4, dndrv4 or zndrv4
107112
if ido[] == -1
@@ -113,7 +118,7 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
113118
elseif ido[] == 99
114119
break
115120
else
116-
throw(ARPACKException("unexpected behavior"))
121+
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
117122
end
118123
else
119124
throw(ArgumentError("ARPACK mode ($mode) not yet supported"))
@@ -201,7 +206,7 @@ function eupd_wrapper(T, n::Integer, sym::Bool, cmplx::Bool, bmat::String,
201206
evec[:,j] = v[:,j]
202207
j += 1
203208
else
204-
throw(ARPACKException("unexpected behavior"))
209+
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
205210
end
206211
end
207212

0 commit comments

Comments
 (0)