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

Fails to put large variables to the Matlab engine #154

Open
stelmo opened this issue Nov 28, 2018 · 3 comments
Open

Fails to put large variables to the Matlab engine #154

stelmo opened this issue Nov 28, 2018 · 3 comments

Comments

@stelmo
Copy link

stelmo commented Nov 28, 2018

Hi, I wrote a small script that uses Matlab's nnmf function to factorize a large matrix (~5000 rows by 60000 columns). I generate the matrix, called V, in Julia and I use the following code to call the function:
w, h, rss = mxcall(:nnmf, 3, V, 2)

Unfortunately this generates the error:

ERROR: MATLAB.MEngineError("failed to put variable jx_nnmf_arg_in_1 into MATLAB session (err = 1)")
Stacktrace:
[1] put_variable(::MSession, ::Symbol, ::Array{Float64,2}) at C:\Users\St. Elmo.julia\packages\MATLAB\SljED\src\engine.jl:153
[2] mxcall(::MSession, ::Symbol, ::Int64, ::Array{Float64,2}, ::Vararg{Any,N} where N) at C:\Users\St. Elmo.julia\packages\MATLAB\SljED\src\engine.jl:283
[3] mxcall(::Symbol, ::Int64, ::Array{Float64,2}, ::Int64) at C:\Users\St. Elmo.julia\packages\MATLAB\SljED\src\engine.jl:317
[4] top-level scope at none:0

I tried this on multiple Julia versions (6.4 and 1.0.2) to the same effect. When I run the same function with the same matrix in Matlab it works. My suspicion is that the large matrix is causing the problem. Is there a way around it?

Ps. This approach works on smaller input matrices.

@yakir12
Copy link

yakir12 commented Jun 17, 2019

I suffer from the same problem (I want to use Matlab's camera calibration toolbox on images (arrays of RGB) generated in Julia).

@ftudisco
Copy link

I suffer the same problem too... did any of you figure out a way out?

@yakir12
Copy link

yakir12 commented May 31, 2020

Don't do it. I assume if you don't care about timing you could save to and load from disk...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants