From 58782124de3fd00ed973f3059425c97a7cd9e93c Mon Sep 17 00:00:00 2001 From: Patrick Belliveau Date: Mon, 3 Jul 2017 14:20:08 -0700 Subject: [PATCH 1/4] Fix sqrt broadcasting deprecation warning in blockCG. KrylovMethods now passes tests with no depwarns in 0.6 --- src/blockCG.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blockCG.jl b/src/blockCG.jl index 741fcc1..e8a9f0f 100644 --- a/src/blockCG.jl +++ b/src/blockCG.jl @@ -24,7 +24,7 @@ Input: X - array of starting guesses (will be overwritten) out - flag for output (-1: no output, 0: only errors, 1: final status, 2: residual norm at each iteration) ortho - flag for re-orthogonalization (default: false) - pinvTol - tolerance for pseudoinverse (default: eps(T)*size(B,1)) + pinvTol - tolerance for pseudoinverse (default: eps(T)\*size(B,1)) storeInterm - flag for storing iterates (default: false) Output: @@ -137,7 +137,7 @@ function computeNorm(R) res[k]+=R[i,k]*R[i,k] end end - return sqrt(res) + return sqrt.(res) end function getPinv!(A,pinvTol) @@ -145,6 +145,6 @@ function getPinv!(A,pinvTol) Sinv = zeros(length(SVD.S)) index = SVD.S .> pinvTol*maximum(SVD.S) Sinv[index] = 1.0./ SVD.S[index] - Sinv[find(!isfinite(Sinv))] = 0.0 + Sinv[find(.!isfinite.(Sinv))] = 0.0 return SVD.Vt'*(Diagonal(Sinv)*SVD.U') end From 5f2d111827b72e551cc84b9c7469a72c64e26b42 Mon Sep 17 00:00:00 2001 From: Patrick Belliveau Date: Thu, 3 Aug 2017 12:33:32 -0700 Subject: [PATCH 2/4] Added using Compat to maintain 0.5 compatibility while getting rid of deprecation warnings in 0.6. Added Compat to require file and updated CI config to test 0.5 and 0.6 --- .travis.yml | 5 +++-- REQUIRE | 1 + appveyor.yml | 2 ++ src/KrylovMethods.jl | 13 +++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe917dc..f5f07ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,12 @@ os: julia: - 0.5 + - 0.6 - nightly - + notifications: email: false - + #script: # use the default script setting, which is equivalent to the following # - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi # - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("KrylovMethods"); Pkg.test("KrylovMethods"; coverage=true)' diff --git a/REQUIRE b/REQUIRE index 94237c0..be9c553 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1 +1,2 @@ julia 0.5 +Compat diff --git a/appveyor.yml b/appveyor.yml index 14db638..13bbb10 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,8 @@ environment: matrix: - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe" - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe" + - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" + - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" diff --git a/src/KrylovMethods.jl b/src/KrylovMethods.jl index 6e1653b..2f7af4b 100644 --- a/src/KrylovMethods.jl +++ b/src/KrylovMethods.jl @@ -1,18 +1,19 @@ module KrylovMethods - + import Base.BLAS - + using Compat + include("cg.jl") include("blockCG.jl") include("cgls.jl") include("bicgstb.jl") include("blockBiCGSTB.jl") - include("gmres.jl") + include("gmres.jl") include("lanczosBidiag.jl") - include("ssor.jl") - include("lsqr.jl") + include("ssor.jl") + include("lsqr.jl") include("lanczosTridiag.jl") include("lanczos.jl") include("minres.jl") include("gs.jl") -end \ No newline at end of file +end From 68c9d8efffbb1923bb97a4555cbba31e91793e1d Mon Sep 17 00:00:00 2001 From: Patrick Belliveau Date: Wed, 6 Jun 2018 09:29:55 -0700 Subject: [PATCH 3/4] Add precompilation --- src/KrylovMethods.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KrylovMethods.jl b/src/KrylovMethods.jl index 2f7af4b..4cba726 100644 --- a/src/KrylovMethods.jl +++ b/src/KrylovMethods.jl @@ -1,3 +1,5 @@ +__precompile__() + module KrylovMethods import Base.BLAS From 750dfaadbc48a549699ecdfd468cc5b1ee0695b2 Mon Sep 17 00:00:00 2001 From: Patrick Belliveau Date: Wed, 6 Jun 2018 10:43:34 -0700 Subject: [PATCH 4/4] Drop 0.5 CI tests --- .travis.yml | 1 - appveyor.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5f07ec..db2360d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ os: - linux julia: - - 0.5 - 0.6 - nightly diff --git a/appveyor.yml b/appveyor.yml index 13bbb10..a258d64 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,5 @@ environment: matrix: - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe" - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe" - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"