From d456c1e8cc95c1a73b1ea23106243c7053b6969f Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 06:56:36 -0400 Subject: [PATCH 1/7] Add Unpack.jl to LinearSolvePardiso --- lib/LinearSolvePardiso/Project.toml | 2 ++ lib/LinearSolvePardiso/src/LinearSolvePardiso.jl | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/LinearSolvePardiso/Project.toml b/lib/LinearSolvePardiso/Project.toml index 35588780e..fcb613e04 100644 --- a/lib/LinearSolvePardiso/Project.toml +++ b/lib/LinearSolvePardiso/Project.toml @@ -8,11 +8,13 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" [compat] SciMLBase = "1.25" LinearSolve = "1" Pardiso = "0.5" +UnPack = "1" julia = "1.6" [extras] diff --git a/lib/LinearSolvePardiso/src/LinearSolvePardiso.jl b/lib/LinearSolvePardiso/src/LinearSolvePardiso.jl index ea27c09f3..9981b137c 100644 --- a/lib/LinearSolvePardiso/src/LinearSolvePardiso.jl +++ b/lib/LinearSolvePardiso/src/LinearSolvePardiso.jl @@ -1,6 +1,7 @@ module LinearSolvePardiso using Pardiso, LinearSolve, SciMLBase +using UnPack Base.@kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm nprocs::Union{Int,Nothing} = nothing From 88012c2ace5f0b7db40dd33b9857c48184c09fdf Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 07:03:35 -0400 Subject: [PATCH 2/7] test if CI is getting the right groups --- test/runtests.jl | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 9e725b080..0381d30cf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,27 +5,35 @@ const LONGER_TESTS = false const GROUP = get(ENV, "GROUP", "All") function dev_subpkg(subpkg) - subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg) - Pkg.develop(PackageSpec(path=subpkg_path)) + subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg) + Pkg.develop(PackageSpec(path=subpkg_path)) end function activate_subpkg_env(subpkg) - subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg) - Pkg.activate(subpkg_path) - Pkg.develop(PackageSpec(path=subpkg_path)) - Pkg.instantiate() + subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg) + Pkg.activate(subpkg_path) + Pkg.develop(PackageSpec(path=subpkg_path)) + Pkg.instantiate() end +@show GROUP, GROUP == "LinearSolvePardiso" + if GROUP == "All" || GROUP == "Core" - @time @safetestset "Basic Tests" begin include("basictests.jl") end + @time @safetestset "Basic Tests" begin + include("basictests.jl") + end end if GROUP == "LinearSolveCUDA" dev_subpkg("LinearSolveCUDA") - @time @safetestset "CUDA" begin include("../lib/LinearSolveCUDA/test/runtests.jl") end + @time @safetestset "CUDA" begin + include("../lib/LinearSolveCUDA/test/runtests.jl") + end end if GROUP == "LinearSolvePardiso" dev_subpkg("LinearSolvePardiso") - @time @safetestset "Pardiso" begin include("../lib/LinearSolvePardiso/test/runtests.jl") end + @time @safetestset "Pardiso" begin + include("../lib/LinearSolvePardiso/test/runtests.jl") + end end From 2b8a763e450772b6bbaa3e31e5161d0f4cf91678 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 07:05:59 -0400 Subject: [PATCH 3/7] fix CI script --- .github/workflows/CI.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5404cf916..48d43f2a4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,17 +2,18 @@ name: CI on: pull_request: branches: - - main + - master push: branches: - - main + - master jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: group: - - All + - Core - LinearSolvePardiso version: - '1' @@ -25,7 +26,6 @@ jobs: - uses: actions/cache@v1 env: cache-name: cache-artifacts - GROUP: ${{ matrix.group }} with: path: ~/.julia/artifacts key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} @@ -35,11 +35,9 @@ jobs: ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + env: + GROUP: ${{ matrix.group }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: file: lcov.info - - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./lcov.info From 76744c8b746f1afbea0aa8edd00ac6dd80899775 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 07:06:17 -0400 Subject: [PATCH 4/7] use main --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 48d43f2a4..f1266c2d5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,10 +2,10 @@ name: CI on: pull_request: branches: - - master + - main push: branches: - - master + - main jobs: test: runs-on: ubuntu-latest From acf73a41038c6e799d5a0145f97ea2582b736ddf Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 07:52:02 -0400 Subject: [PATCH 5/7] fix test definition --- lib/LinearSolvePardiso/test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/LinearSolvePardiso/test/runtests.jl b/lib/LinearSolvePardiso/test/runtests.jl index 811eeb28a..f7fe84b71 100644 --- a/lib/LinearSolvePardiso/test/runtests.jl +++ b/lib/LinearSolvePardiso/test/runtests.jl @@ -8,6 +8,7 @@ b1 = rand(4) prob1 = LinearProblem(A1, b1) lambda = 3 +n = 4 e = ones(n) e2 = ones(n - 1) A2 = spdiagm(-1 => im * e2, 0 => lambda * e, 1 => -im * e2) @@ -29,7 +30,6 @@ for alg in ( @test_broken A2 * u ≈ b2 end -n = 4 Random.seed!(10) A = sprand(n, n, 0.8); A2 = 2.0 .* A; From 9e062c725b5d326f7fa88b1b5999b0e38ea5f2f8 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 08:00:52 -0400 Subject: [PATCH 6/7] missing test variable --- lib/LinearSolvePardiso/test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/LinearSolvePardiso/test/runtests.jl b/lib/LinearSolvePardiso/test/runtests.jl index f7fe84b71..ad3b3d7d2 100644 --- a/lib/LinearSolvePardiso/test/runtests.jl +++ b/lib/LinearSolvePardiso/test/runtests.jl @@ -13,6 +13,7 @@ e = ones(n) e2 = ones(n - 1) A2 = spdiagm(-1 => im * e2, 0 => lambda * e, 1 => -im * e2) b2 = rand(n) + im * zeros(n) +cache_kwargs = (; verbose=true, abstol=1e-8, reltol=1e-8, maxiter=30) prob2 = LinearProblem(A2, b2) From bd0d3301884f566ac5c25962c76d3de49c84d6fe Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 21 May 2022 08:08:51 -0400 Subject: [PATCH 7/7] add Random --- lib/LinearSolvePardiso/Project.toml | 3 ++- lib/LinearSolvePardiso/test/runtests.jl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/LinearSolvePardiso/Project.toml b/lib/LinearSolvePardiso/Project.toml index fcb613e04..2ec3b8219 100644 --- a/lib/LinearSolvePardiso/Project.toml +++ b/lib/LinearSolvePardiso/Project.toml @@ -18,7 +18,8 @@ UnPack = "1" julia = "1.6" [extras] +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test"] \ No newline at end of file +test = ["Random", "Test"] \ No newline at end of file diff --git a/lib/LinearSolvePardiso/test/runtests.jl b/lib/LinearSolvePardiso/test/runtests.jl index ad3b3d7d2..2b1fd0b42 100644 --- a/lib/LinearSolvePardiso/test/runtests.jl +++ b/lib/LinearSolvePardiso/test/runtests.jl @@ -1,4 +1,4 @@ -using LinearSolve, LinearSolvePardiso, SparseArrays +using LinearSolve, LinearSolvePardiso, SparseArrays, Random A1 = sparse([1.0 0 -2 3 0 5 1 2