-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexing SubArrays with Int32 returns zero dimensional array #15168
Comments
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 |
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 Line 123 in 4ce06c2
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 |
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 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 |
convert
an object of type Array{Float32,0} to an object of type Float32"permute!
error for SubArrays
and Int32 permutation vector.
permute!
error for SubArrays
and Int32 permutation vector.
Indexing of 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
The text was updated successfully, but these errors were encountered: