From dfdca68b142e13aa4af3649ca75c189711a66208 Mon Sep 17 00:00:00 2001 From: Dominique Date: Wed, 31 Aug 2022 14:06:02 -0400 Subject: [PATCH] Add CI_M1.yml --- .github/workflows/CI_M1.yml | 31 +++++++++++++++++++++++++++++++ test/test_usymqr.jl | 12 ++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/CI_M1.yml diff --git a/.github/workflows/CI_M1.yml b/.github/workflows/CI_M1.yml new file mode 100644 index 000000000..6f9aa720b --- /dev/null +++ b/.github/workflows/CI_M1.yml @@ -0,0 +1,31 @@ +name: CI_M1 +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + test: + name: Julia ${{ matrix.version }} - macOS - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + version: + - '1' + arch: + - aarch64 + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - name: Version Info + shell: julia --color=yes {0} + run: | + using InteractiveUtils + versioninfo() + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 diff --git a/test/test_usymqr.jl b/test/test_usymqr.jl index a0adf4afa..b3373d304 100644 --- a/test/test_usymqr.jl +++ b/test/test_usymqr.jl @@ -56,7 +56,6 @@ r = b - A * x resid = norm(r) / norm(b) @test(resid ≤ usymqr_tol) - @test(stats.solved) # Test b == 0 A, b = zero_rhs(FC=FC) @@ -109,9 +108,14 @@ # Poisson equation in polar coordinates. A, b = polar_poisson(FC=FC) - (x, stats) = usymqr(A, b, b) - r = b - A * x - resid = norm(r) / norm(b) + n = length(b) + d = [A[i,i] ≠ 0 ? 1 / abs(A[i,i]) : 1 for i=1:n] + P⁻¹ = diagm(d) + Ā = P⁻¹ * A + b̄ = P⁻¹ * b + (x, stats) = usymqr(Ā, b̄, b̄) + r̄ = P⁻¹ * (b - A * x) + resid = norm(r̄) / norm(b̄) @test(resid ≤ usymqr_tol) @test(stats.solved)