From c88e3e2a341cc7de3d2a19bbaa5d8dc12ea72652 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 9 Oct 2022 22:41:23 -0400 Subject: [PATCH] [GPU] Update the error message --- src/bicgstab.jl | 4 ++-- src/bilq.jl | 4 ++-- src/bilqr.jl | 4 ++-- src/cg.jl | 2 +- src/cg_lanczos.jl | 2 +- src/cg_lanczos_shift.jl | 2 +- src/cgls.jl | 2 +- src/cgne.jl | 2 +- src/cgs.jl | 4 ++-- src/cr.jl | 2 +- src/craig.jl | 2 +- src/craigmr.jl | 2 +- src/crls.jl | 2 +- src/crmr.jl | 2 +- src/diom.jl | 2 +- src/dqgmres.jl | 2 +- src/fgmres.jl | 2 +- src/fom.jl | 2 +- src/gmres.jl | 2 +- src/gpmr.jl | 4 ++-- src/lnlq.jl | 2 +- src/lslq.jl | 2 +- src/lsmr.jl | 2 +- src/lsqr.jl | 2 +- src/minres.jl | 2 +- src/minres_qlp.jl | 2 +- src/qmr.jl | 4 ++-- src/symmlq.jl | 2 +- src/tricg.jl | 4 ++-- src/trilqr.jl | 4 ++-- src/trimr.jl | 4 ++-- src/usymlq.jl | 4 ++-- src/usymqr.jl | 4 ++-- 33 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/bicgstab.jl b/src/bicgstab.jl index 4d234234e..588f64838 100644 --- a/src/bicgstab.jl +++ b/src/bicgstab.jl @@ -112,8 +112,8 @@ function bicgstab!(solver :: BicgstabSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :t , S, n) diff --git a/src/bilq.jl b/src/bilq.jl index c26431426..002858943 100644 --- a/src/bilq.jl +++ b/src/bilq.jl @@ -96,8 +96,8 @@ function bilq!(solver :: BilqSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Ab # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/bilqr.jl b/src/bilqr.jl index 592c5a982..4677e9e9d 100644 --- a/src/bilqr.jl +++ b/src/bilqr.jl @@ -102,8 +102,8 @@ function bilqr!(solver :: BilqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :: # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/cg.jl b/src/cg.jl index 4d42c8215..09b91e64c 100644 --- a/src/cg.jl +++ b/src/cg.jl @@ -107,7 +107,7 @@ function cg!(solver :: CgSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :z, S, n) diff --git a/src/cg_lanczos.jl b/src/cg_lanczos.jl index a91d52d79..b49cdd726 100644 --- a/src/cg_lanczos.jl +++ b/src/cg_lanczos.jl @@ -99,7 +99,7 @@ function cg_lanczos!(solver :: CgLanczosSolver{T,FC,S}, A, b :: AbstractVector{F # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $T") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :v, S, n) diff --git a/src/cg_lanczos_shift.jl b/src/cg_lanczos_shift.jl index 7d6371ddb..a548fe2aa 100644 --- a/src/cg_lanczos_shift.jl +++ b/src/cg_lanczos_shift.jl @@ -89,7 +89,7 @@ function cg_lanczos_shift!(solver :: CgLanczosShiftSolver{T,FC,S}, A, b :: Abstr # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :v, S, n) diff --git a/src/cgls.jl b/src/cgls.jl index fd8d1c82d..ac4bb9b8d 100644 --- a/src/cgls.jl +++ b/src/cgls.jl @@ -102,7 +102,7 @@ function cgls!(solver :: CglsSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/cgne.jl b/src/cgne.jl index f70f6967d..50155057c 100644 --- a/src/cgne.jl +++ b/src/cgne.jl @@ -111,7 +111,7 @@ function cgne!(solver :: CgneSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/cgs.jl b/src/cgs.jl index f9988f911..9b4eb695f 100644 --- a/src/cgs.jl +++ b/src/cgs.jl @@ -109,8 +109,8 @@ function cgs!(solver :: CgsSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Abst # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :vw, S, n) diff --git a/src/cr.jl b/src/cr.jl index 88dd1d390..79f2cd289 100644 --- a/src/cr.jl +++ b/src/cr.jl @@ -106,7 +106,7 @@ function cr!(solver :: CrSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace allocate_if(!MisI, solver, :Mq, S, n) diff --git a/src/craig.jl b/src/craig.jl index 5ed395199..7f87d0861 100644 --- a/src/craig.jl +++ b/src/craig.jl @@ -142,7 +142,7 @@ function craig!(solver :: CraigSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/craigmr.jl b/src/craigmr.jl index 377beb388..776a25558 100644 --- a/src/craigmr.jl +++ b/src/craigmr.jl @@ -137,7 +137,7 @@ function craigmr!(solver :: CraigmrSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/crls.jl b/src/crls.jl index 71d8be16f..da9471fe2 100644 --- a/src/crls.jl +++ b/src/crls.jl @@ -93,7 +93,7 @@ function crls!(solver :: CrlsSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/crmr.jl b/src/crmr.jl index 9f8e7a155..b4445ef81 100644 --- a/src/crmr.jl +++ b/src/crmr.jl @@ -109,7 +109,7 @@ function crmr!(solver :: CrmrSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/diom.jl b/src/diom.jl index 8a18cb26c..58986ab47 100644 --- a/src/diom.jl +++ b/src/diom.jl @@ -107,7 +107,7 @@ function diom!(solver :: DiomSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :w, S, n) diff --git a/src/dqgmres.jl b/src/dqgmres.jl index dd828797c..2dd5b0843 100644 --- a/src/dqgmres.jl +++ b/src/dqgmres.jl @@ -107,7 +107,7 @@ function dqgmres!(solver :: DqgmresSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :w, S, n) diff --git a/src/fgmres.jl b/src/fgmres.jl index 6d8a839f8..b79c197ba 100644 --- a/src/fgmres.jl +++ b/src/fgmres.jl @@ -109,7 +109,7 @@ function fgmres!(solver :: FgmresSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI , solver, :q , S, n) diff --git a/src/fom.jl b/src/fom.jl index 120a2a37b..4ea3fce92 100644 --- a/src/fom.jl +++ b/src/fom.jl @@ -104,7 +104,7 @@ function fom!(solver :: FomSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI , solver, :q , S, n) diff --git a/src/gmres.jl b/src/gmres.jl index bb1f53fac..ac425054f 100644 --- a/src/gmres.jl +++ b/src/gmres.jl @@ -104,7 +104,7 @@ function gmres!(solver :: GmresSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI , solver, :q , S, n) diff --git a/src/gpmr.jl b/src/gpmr.jl index c8987a95c..f94f6e4ac 100644 --- a/src/gpmr.jl +++ b/src/gpmr.jl @@ -143,8 +143,8 @@ function gpmr!(solver :: GpmrSolver{T,FC,S}, A, B, b :: AbstractVector{FC}, c :: # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") eltype(B) == FC || error("eltype(B) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Determine λ and μ associated to generalized saddle point systems. gsp && (λ = one(FC) ; μ = zero(FC)) diff --git a/src/lnlq.jl b/src/lnlq.jl index f6fc5a8e4..b39241a30 100644 --- a/src/lnlq.jl +++ b/src/lnlq.jl @@ -134,7 +134,7 @@ function lnlq!(solver :: LnlqSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/lslq.jl b/src/lslq.jl index 6ae9ed3aa..7ddc6f5cb 100644 --- a/src/lslq.jl +++ b/src/lslq.jl @@ -176,7 +176,7 @@ function lslq!(solver :: LslqSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/lsmr.jl b/src/lsmr.jl index 49ba609ab..bf2df3c8c 100644 --- a/src/lsmr.jl +++ b/src/lsmr.jl @@ -141,7 +141,7 @@ function lsmr!(solver :: LsmrSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/lsqr.jl b/src/lsqr.jl index afd726af5..bcff1e6e7 100644 --- a/src/lsqr.jl +++ b/src/lsqr.jl @@ -136,7 +136,7 @@ function lsqr!(solver :: LsqrSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/minres.jl b/src/minres.jl index e775ee6e7..c1d5d5751 100644 --- a/src/minres.jl +++ b/src/minres.jl @@ -124,7 +124,7 @@ function minres!(solver :: MinresSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :v, S, n) diff --git a/src/minres_qlp.jl b/src/minres_qlp.jl index d0e9ca39f..a1c9fc01b 100644 --- a/src/minres_qlp.jl +++ b/src/minres_qlp.jl @@ -105,7 +105,7 @@ function minres_qlp!(solver :: MinresQlpSolver{T,FC,S}, A, b :: AbstractVector{F # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :vₖ, S, n) diff --git a/src/qmr.jl b/src/qmr.jl index 6ac2d61d5..cf3328649 100644 --- a/src/qmr.jl +++ b/src/qmr.jl @@ -102,8 +102,8 @@ function qmr!(solver :: QmrSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Abst # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/symmlq.jl b/src/symmlq.jl index 982b1c0fd..10d903049 100644 --- a/src/symmlq.jl +++ b/src/symmlq.jl @@ -105,7 +105,7 @@ function symmlq!(solver :: SymmlqSolver{T,FC,S}, A, b :: AbstractVector{FC}; # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") # Set up workspace. allocate_if(!MisI, solver, :v, S, n) diff --git a/src/tricg.jl b/src/tricg.jl index 512eacf0b..f4a3c35f2 100644 --- a/src/tricg.jl +++ b/src/tricg.jl @@ -132,8 +132,8 @@ function tricg!(solver :: TricgSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :: # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Determine τ and ν associated to SQD, SPD or SND systems. flip && (τ = -one(T) ; ν = one(T)) diff --git a/src/trilqr.jl b/src/trilqr.jl index a31e0a950..7aa90d1c9 100644 --- a/src/trilqr.jl +++ b/src/trilqr.jl @@ -101,8 +101,8 @@ function trilqr!(solver :: TrilqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c : # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/trimr.jl b/src/trimr.jl index dcc64cbbe..0905f351e 100644 --- a/src/trimr.jl +++ b/src/trimr.jl @@ -135,8 +135,8 @@ function trimr!(solver :: TrimrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :: # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Determine τ and ν associated to SQD, SPD or SND systems. flip && (τ = -one(T) ; ν = one(T)) diff --git a/src/usymlq.jl b/src/usymlq.jl index 842e5cb0c..d61fc10b0 100644 --- a/src/usymlq.jl +++ b/src/usymlq.jl @@ -110,8 +110,8 @@ function usymlq!(solver :: UsymlqSolver{T,FC,S}, A, b :: AbstractVector{FC}, c : # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A' diff --git a/src/usymqr.jl b/src/usymqr.jl index 49a1e000f..2cef2db0d 100644 --- a/src/usymqr.jl +++ b/src/usymqr.jl @@ -107,8 +107,8 @@ function usymqr!(solver :: UsymqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c : # Check type consistency eltype(A) == FC || error("eltype(A) ≠ $FC") - ktypeof(b) <: S || error("ktypeof(b) ≠ $S") - ktypeof(c) <: S || error("ktypeof(c) ≠ $S") + ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S") + ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S") # Compute the adjoint of A Aᴴ = A'