Skip to content

Commit

Permalink
Merge pull request #81 from JuliaLinearAlgebra/sf/jll_package
Browse files Browse the repository at this point in the history
Upgrade to Julia 1.3+, use JLL packages
  • Loading branch information
andreasnoack authored Dec 4, 2019
2 parents 0e738a1 + e320e64 commit a7cdb6d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 109 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ os:
- linux
- osx
julia:
- 0.7
- 1.0
- 1.3
- nightly
notifications:
email: false
Expand Down
9 changes: 4 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name = "Arpack"
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
version = "0.3.2"
version = "0.4.0"

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

[compat]
BinaryProvider = "0.5"
julia = "0.7, 1"
Arpack_jll = "~3.5"
julia = "1.3"

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

[targets]
test = ["Random", "SparseArrays", "Test"]

2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
matrix:
- julia_version: 0.7
- julia_version: 1.3
- julia_version: latest

platform:
Expand Down
3 changes: 0 additions & 3 deletions deps/.gitignore

This file was deleted.

74 changes: 0 additions & 74 deletions deps/build.jl

This file was deleted.

21 changes: 2 additions & 19 deletions src/Arpack.jl
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

__precompile__(true)

"""
Arnoldi and Lanczos iteration for computing eigenvalues
"""
module Arpack

# To make Pkg aware that this dependency
# will be injected by BinaryProvider.
using Libdl

const depsfile = joinpath(@__DIR__, "..", "deps", "deps.jl")

if isfile(depsfile)
include(depsfile)
else
throw(ErrorException("""
No deps.jl file could be found. Please try running Pkg.build("Arpack").
Currently, the build command might fail when Julia has been built from source
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
"""))
end
# Load in our binary dependencies
using Arpack_jll

using LinearAlgebra: BlasFloat, BlasInt, Diagonal, I, SVD, UniformScaling,
checksquare, factorize, ishermitian, issymmetric, mul!,
Expand Down
15 changes: 10 additions & 5 deletions src/libarpack.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

import LinearAlgebra: BlasInt

# A convenient shortcut to show unexpected behavior from libarpack
ERR_UNEXPECTED_BEHAVIOR = -999
@static if isdefined(LinearAlgebra, :ARPACKException)
import LinearAlgebra: ARPACKException
else
Expand All @@ -18,6 +21,8 @@ else
print(io, string("did not find any eigenvalues to sufficient accuracy. ",
"Try with a different starting vector or more Lanczos vectors ",
"by increasing the value of ncv."))
elseif ex.info == -999
print(io, "Unexepcted behavior")
else
print(io, "unspecified ARPACK error: $(ex.info)")
end
Expand Down Expand Up @@ -79,15 +84,15 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
elseif ido[] == 99
break
else
throw(ARPACKException("unexpected behavior"))
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
end
elseif mode == 3 && bmat == "I" # corresponds to dsdrv2, dndrv2 or zndrv2
if ido[] == -1 || ido[] == 1
y[:] = solveSI(x)
elseif ido[] == 99
break
else
throw(ARPACKException("unexpected behavior"))
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
end
elseif mode == 2 # corresponds to dsdrv3, dndrv3 or zndrv3
if ido[] == -1 || ido[] == 1
Expand All @@ -101,7 +106,7 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
elseif ido[] == 99
break
else
throw(ARPACKException("unexpected behavior"))
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
end
elseif mode == 3 && bmat == "G" # corresponds to dsdrv4, dndrv4 or zndrv4
if ido[] == -1
Expand All @@ -113,7 +118,7 @@ function aupd_wrapper(T, matvecA!::Function, matvecB::Function, solveSI::Functio
elseif ido[] == 99
break
else
throw(ARPACKException("unexpected behavior"))
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
end
else
throw(ArgumentError("ARPACK mode ($mode) not yet supported"))
Expand Down Expand Up @@ -201,7 +206,7 @@ function eupd_wrapper(T, n::Integer, sym::Bool, cmplx::Bool, bmat::String,
evec[:,j] = v[:,j]
j += 1
else
throw(ARPACKException("unexpected behavior"))
throw(ARPACKException(ERR_UNEXPECTED_BEHAVIOR))
end
end

Expand Down

2 comments on commit a7cdb6d

@andreasnoack
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/6229

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" a7cdb6d7f19f076f5fadd8b58a9c5a061c48322f
git push origin v0.4.0

Please sign in to comment.