Closed nalimilan closed 8 years ago
Note that it never happens on 32-bit.
I get this 100% of the time on 64-bit. What can I do to help debugging? Would a bisection be useful?
Can you reduce the test case? (e.g. reproduce it in a single process test/single test and try to remove unrelated code from the test)
Hmmm, seems that I can reproduce it locally too.
Reduced test case
n = 10
srand(1234321)
areal = randn(n, n) / 2
breal = randn(n, 2) / 2
a = convert(Matrix{Float32}, areal)
apd = a'*a # symmetric positive-definite
cpapd = cholfact(apd, :U, Val{true})
b = convert(Matrix{Float32}, breal)
cpapd\b
@andreasnoack ?
Anything special about your setup? I don't get the error.
Just to check if you know anything related changes recently.
I don't think so. I wondering if other changes in base could have affected this. The code lowering changes are definitely changing behavior for some packages.
Long shot, but I noticed that the type for pivoted Cholesky is weird. Would you try to substitute the StridedMatrix{T}
in https://github.com/JuliaLang/julia/blob/4ce06c2ea52dbd69266d86f7da7382f4c6a0a423/base/linalg/cholesky.jl#L123 with typeof(A)
and see what happens.
I also see it locally when building the RPM, but not when building from the Julia tree (i.e. without all of the USE_SYSTEM_*=1
). Maybe an issue with 32-bit BLAS integers (LP64)?
Maybe an issue with 32-bit BLAS integers (LP64)?
Yes. I've just been able to reproduce this with MKL LP64.
I won't be able to check in the next few ours but for the record I'm using system-wise installed openblas. (configure)
This is not an issue with CholeskyPivoted, but an issue with permute!
for SubArrays
+ Int32
permutation vector.
julia> permute!(sub(rand(10), 1:10), map(Int32, randperm(10)))
ERROR: MethodError: Cannot `convert` an object of type Array{Float64,0} to an object of type Float64
This may have arisen from a call to the constructor Float64(...),
since type constructors fall back to convert methods.
LP64 + Pivoted Cholesky just happens to produce a Vector{Int32}
permutation.
Indexing of SubArrays
is returning a zero dimensional array when the index is Int32
. @mbauman This has probably changed lately. Do you have a good fix for this?
julia> sb = sub(rand(10), 1:10, 1)
10-element SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64},Int64},true}:
0.0707466
0.646484
0.676914
0.30983
0.295709
0.645556
0.631727
0.724235
0.130693
0.684235
julia> sb[1]
0.07074656544530544
julia> sb[Int32(1)]
0-dimensional Array{Float64,0}:
0.0707466
Yup, this is certainly my doing. I thought that #15144 should have prevented this, but I'll take another look.
I've seen this error for the first time today when building RPM nightlies. It happened twice, both on 64-bit. This is with system LLVM 3.7.1 + Julia patches and ORCJIT.
https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/epel-7-x86_64/00161544-julia/build.log.gz https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-rawhide-x86_64/00161544-julia/build.log.gz