Skip to content
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

hvcat error for large, mixed-type matrix literals #23430

Closed
nolta opened this issue Aug 24, 2017 · 1 comment
Closed

hvcat error for large, mixed-type matrix literals #23430

nolta opened this issue Aug 24, 2017 · 1 comment
Assignees
Labels
arrays [a, r, r, a, y, s] bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@nolta
Copy link
Member

nolta commented Aug 24, 2017

$ cat x.jl 
x = [
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.;
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.;
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.;
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.;
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.;
0 0.; 0 0.; 0 0.; 0 0.; 
]
$ ./julia -L x.jl 
ERROR: LoadError: UndefVarError: T not defined
hvcat(::NTuple{64,Int64}, ::Int64, ::Vararg{T<:Union{Int64, Float64},N} where N) at ./abstractarray.jl:1516
include_relative(::Module, ::String) at ./loading.jl:464
include at ./sysimg.jl:14 [inlined]
(::Base.Distributed.##145#146{Base.#include,Tuple{Module,String},Array{Any,1}})() at ./distributed/remotecall.jl:332
run_work_thunk(::Base.Distributed.##145#146{Base.#include,Tuple{Module,String},Array{Any,1}}, ::Bool) at ./distributed/process_messages.jl:56
#remotecall_fetch#150(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:357
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:357
#remotecall_fetch#154(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:385
remotecall_fetch(::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:385
(::Base.##530#532{Base.JLOptions})() at ./task.jl:335
while loading /scratch/nolta/julia/x.jl, in expression starting on line 1
#remotecall_fetch#150(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.LocalProcess, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:358
remotecall_fetch(::Function, ::Base.Distributed.LocalProcess, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:357
#remotecall_fetch#154(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:385
remotecall_fetch(::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at ./distributed/remotecall.jl:385
(::Base.##530#532{Base.JLOptions})() at ./task.jl:335
Stacktrace:
 [1] sync_end() at ./task.jl:287
 [2] macro expansion at ./task.jl:303 [inlined]
 [3] process_options(::Base.JLOptions) at ./client.jl:291
 [4] _start() at ./client.jl:383

A clue: the array has 64 rows. Deleting one row fixes the error.

@ararslan ararslan added the arrays [a, r, r, a, y, s] label Aug 24, 2017
@fredrikekre
Copy link
Member

Likely caused by #23117, since T is not captured here:

function hvcat(rows::Tuple{Vararg{Int}}, xs::T...) where T<:Number

@vtjnash vtjnash added bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch labels Aug 24, 2017
@JeffBezanson JeffBezanson self-assigned this Aug 25, 2017
JeffBezanson added a commit that referenced this issue Aug 28, 2017
fix #23430, counter overflow in subtyping
ararslan pushed a commit that referenced this issue Sep 11, 2017
fix #23430, counter overflow in subtyping

Ref #23447
(cherry picked from commit 5b12051)
ararslan pushed a commit that referenced this issue Sep 13, 2017
vtjnash pushed a commit that referenced this issue Sep 14, 2017
ararslan pushed a commit that referenced this issue Sep 15, 2017
ararslan pushed a commit that referenced this issue Sep 16, 2017
ararslan pushed a commit that referenced this issue Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

5 participants