JuliaSmoothOptimizers / LinearOperators.jl

Linear Operators for Julia
Other
149 stars 31 forks source link

Error for product of two operators `LinearOperatorException("storage types cannot be promoted to a concrete type")` #329

Open tmigot opened 2 months ago

tmigot commented 2 months ago
using CUDA, NLPModels, NLPModelsTest, LinearOperators
V = CuArray{Float64, 1, CUDA.Mem.DeviceBuffer}
nlp = BROWNDEN(V)
nvar = nlp.meta.nvar
xc = V(undef, nvar)
Hs = V(undef, nvar)
H = hess_op!(nlp, xc, Hs)

cg_op_diag = V(undef, nvar)
cg_op = opDiagonal(cg_op_diag)

ZHZ = cg_op' * H * cg_op
ERROR: LinearOperatorException("storage types cannot be promoted to a concrete type")
Stacktrace:
 [1] *(op1::AdjointLinearOperator{…}, op2::LinearOperator{…})
   @ LinearOperators C:\Users\tangi\.julia\packages\LinearOperators\lK3j5\src\operations.jl:119
 [2] *(::AdjointLinearOperator{…}, ::LinearOperator{…}, ::LinearOperator{…})
   @ Base .\operators.jl:587
 [3] top-level scope
   @ REPL[11]:1
 [4] top-level scope
   @ C:\Users\tangi\.julia\packages\CUDA\jdJ7Z\src\initialization.jl:206
Some type information was truncated. Use `show(err)` to see complete types.