Closed leios closed 2 years ago
Yes this affects CI as well. It looks like a minimum example on CellListMap 0.8.3 and Julia 1.8.1 is
using CellListMap, StaticArrays, Unitful
CellListMap.Box(SVector(2.0, 2.0, 2.0)u"nm", 1.0u"nm")
ERROR: ArgumentError: zero(Quantity{Float64}) not defined.
Stacktrace:
[1] zero(x::Type{Quantity{Float64}})
@ Unitful ~/.julia/packages/Unitful/SUQzL/src/quantities.jl:386
[2] (::CellListMap.var"#95#96"{SMatrix{3, 3, Quantity{Float64}, 9}})(el::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}})
@ CellListMap ~/.julia/packages/CellListMap/rqPY5/src/CellOperations.jl:547
[3] (::StaticArrays.var"#194#195"{CellListMap.var"#95#96"{SMatrix{3, 3, Quantity{Float64}, 9}}})(x::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}})
@ StaticArrays ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:259
[4] macro expansion
@ ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:140 [inlined]
[5] _mapfoldl
@ ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:115 [inlined]
[6] _mapreduce
@ ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:113 [inlined]
[7] #count#193
@ ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:259 [inlined]
[8] count
@ ~/.julia/packages/StaticArrays/atiPw/src/mapreduce.jl:259 [inlined]
[9] check_unit_cell(unit_cell_matrix::SMatrix{3, 3, Quantity{Float64}, 9}, cutoff::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}; printerr::Bool)
@ CellListMap ~/.julia/packages/CellListMap/rqPY5/src/CellOperations.jl:547
[10] check_unit_cell(unit_cell_matrix::SMatrix{3, 3, Quantity{Float64}, 9}, cutoff::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}})
@ CellListMap ~/.julia/packages/CellListMap/rqPY5/src/CellOperations.jl:536
[11] Box(unit_cell_matrix::SMatrix{3, 3, Quantity{Float64}, 9}, cutoff::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}, lcell::Int64, #unused#::Type{OrthorhombicCell})
@ CellListMap ~/.julia/packages/CellListMap/rqPY5/src/Box.jl:167
[12] Box
@ ~/.julia/packages/CellListMap/rqPY5/src/Box.jl:268 [inlined]
[13] #Box#14
@ ~/.julia/packages/CellListMap/rqPY5/src/Box.jl:270 [inlined]
[14] Box(sides::SVector{3, Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}}, cutoff::Quantity{Float64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}})
@ CellListMap ~/.julia/packages/CellListMap/rqPY5/src/Box.jl:270
[15] top-level scope
@ REPL[9]:1
@lmiq should I open an issue on CellListMap for this?
No need for it. I will release just right now a patch in CellListMap v0.8.4
(I added a workaround for the problem, but I think the bug is on LinearAlgebra: diagm
https://github.com/JuliaLang/julia/issues/46829)
(this occurs in CellListMap v0.8.2 and v0.8.3 only).
Should be fixed now (v0.8.4 is released).
It seems like the tests now pass locally. Thanks for the quick response here!
I updated
CellListMap v0.7.21 ⇒ v0.8.3
and received the following errors on testing the master branch.It seems like the
zero
function in Unitful will purposefully throw an error to a Quantity Type without a unit?The
zero
function is used in the following block for CellListMaps:I've gotten this error on two different machines, but I might still be doing something wrong locally. Here is my
] st
:note that the tests do pass on CellListMaps@v0.7.21