Skip to content

Commit 9cf1981

Browse files
Merge pull request #132 from SciML/unpack
Add Unpack.jl to LinearSolvePardiso
2 parents bcb4791 + bd0d330 commit 9cf1981

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
group:
15-
- All
16+
- Core
1617
- LinearSolvePardiso
1718
version:
1819
- '1'
@@ -25,7 +26,6 @@ jobs:
2526
- uses: actions/cache@v1
2627
env:
2728
cache-name: cache-artifacts
28-
GROUP: ${{ matrix.group }}
2929
with:
3030
path: ~/.julia/artifacts
3131
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
@@ -35,11 +35,9 @@ jobs:
3535
${{ runner.os }}-
3636
- uses: julia-actions/julia-buildpkg@v1
3737
- uses: julia-actions/julia-runtest@v1
38+
env:
39+
GROUP: ${{ matrix.group }}
3840
- uses: julia-actions/julia-processcoverage@v1
3941
- uses: codecov/codecov-action@v1
4042
with:
4143
file: lcov.info
42-
- uses: coverallsapp/github-action@master
43-
with:
44-
github-token: ${{ secrets.GITHUB_TOKEN }}
45-
path-to-lcov: ./lcov.info

lib/LinearSolvePardiso/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
88
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
99
Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2"
1010
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
11+
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
1112

1213
[compat]
1314
SciMLBase = "1.25"
1415
LinearSolve = "1"
1516
Pardiso = "0.5"
17+
UnPack = "1"
1618
julia = "1.6"
1719

1820
[extras]
21+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1922
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2023

2124
[targets]
22-
test = ["Test"]
25+
test = ["Random", "Test"]

lib/LinearSolvePardiso/src/LinearSolvePardiso.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module LinearSolvePardiso
22

33
using Pardiso, LinearSolve, SciMLBase
4+
using UnPack
45

56
Base.@kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm
67
nprocs::Union{Int,Nothing} = nothing

lib/LinearSolvePardiso/test/runtests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using LinearSolve, LinearSolvePardiso, SparseArrays
1+
using LinearSolve, LinearSolvePardiso, SparseArrays, Random
22

33
A1 = sparse([1.0 0 -2 3
44
0 5 1 2
@@ -8,10 +8,12 @@ b1 = rand(4)
88
prob1 = LinearProblem(A1, b1)
99

1010
lambda = 3
11+
n = 4
1112
e = ones(n)
1213
e2 = ones(n - 1)
1314
A2 = spdiagm(-1 => im * e2, 0 => lambda * e, 1 => -im * e2)
1415
b2 = rand(n) + im * zeros(n)
16+
cache_kwargs = (; verbose=true, abstol=1e-8, reltol=1e-8, maxiter=30)
1517

1618
prob2 = LinearProblem(A2, b2)
1719

@@ -29,7 +31,6 @@ for alg in (
2931
@test_broken A2 * u b2
3032
end
3133

32-
n = 4
3334
Random.seed!(10)
3435
A = sprand(n, n, 0.8);
3536
A2 = 2.0 .* A;

test/runtests.jl

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,35 @@ const LONGER_TESTS = false
55
const GROUP = get(ENV, "GROUP", "All")
66

77
function dev_subpkg(subpkg)
8-
subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg)
9-
Pkg.develop(PackageSpec(path=subpkg_path))
8+
subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg)
9+
Pkg.develop(PackageSpec(path=subpkg_path))
1010
end
1111

1212
function activate_subpkg_env(subpkg)
13-
subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg)
14-
Pkg.activate(subpkg_path)
15-
Pkg.develop(PackageSpec(path=subpkg_path))
16-
Pkg.instantiate()
13+
subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg)
14+
Pkg.activate(subpkg_path)
15+
Pkg.develop(PackageSpec(path=subpkg_path))
16+
Pkg.instantiate()
1717
end
1818

19+
@show GROUP, GROUP == "LinearSolvePardiso"
20+
1921
if GROUP == "All" || GROUP == "Core"
20-
@time @safetestset "Basic Tests" begin include("basictests.jl") end
22+
@time @safetestset "Basic Tests" begin
23+
include("basictests.jl")
24+
end
2125
end
2226

2327
if GROUP == "LinearSolveCUDA"
2428
dev_subpkg("LinearSolveCUDA")
25-
@time @safetestset "CUDA" begin include("../lib/LinearSolveCUDA/test/runtests.jl") end
29+
@time @safetestset "CUDA" begin
30+
include("../lib/LinearSolveCUDA/test/runtests.jl")
31+
end
2632
end
2733

2834
if GROUP == "LinearSolvePardiso"
2935
dev_subpkg("LinearSolvePardiso")
30-
@time @safetestset "Pardiso" begin include("../lib/LinearSolvePardiso/test/runtests.jl") end
36+
@time @safetestset "Pardiso" begin
37+
include("../lib/LinearSolvePardiso/test/runtests.jl")
38+
end
3139
end

0 commit comments

Comments
 (0)