jump-dev / SDPNAL.jl

A Julia interface to the SDPNAL+ solver
https://blog.nus.edu.sg/mattohkc/softwares/sdpnalplus
Other
11 stars 0 forks source link

MATLAB.MEngineError("failed to get varible jx_sdpnalplus_arg_out_1 from MATLAB session") #5

Closed wangjie212 closed 11 months ago

wangjie212 commented 4 years ago

When I set SDPNAL as an SDP solver in JuMP, I got the following error: MATLAB.MEngineError("failed to get varible jx_sdpnalplus_arg_out_1 from MATLAB session") I use WINDOWS 10, Julia 1.2, JuMP 0.21.1.

blegat commented 4 years ago

@joaquimg and I both had the same troubles for installing SDPNAL, we plan to add a note in the README, let's check whether you have the same issue. The issue is that there is a startup.m file in the folder where you downloaded SDPNAL. This file is run by MATLAB at startup when you add the SDPNAL folder to the path so that you do not need to add it recursively. The issue is that there is also a .git folder which is quite large and MATLAB crashes trying to add all the subfolders of the .git to the path. So I suggest to delete startup.m and the .git folder. Then add all folder recursively in MATLAB, check that it works with MATLAB. Then it should work in Julia too. Let me know how it goes.

wangjie212 commented 4 years ago

Thanks Benoît. I can successfully run it in MATLAB. But I still got the same error in Julia.

blegat commented 4 years ago

I added a troubleshooting section in the README, let me know if this help

DanielBrosch commented 3 years ago

I have the same issue: SDPNAL installed correctly in MATLAB and is callable there. The paths are properly in pathdef.m, and I removed all other solvers from it for now.

The problem seems to be that the Matlab session that julia opens does not seem to use the paths defined in toolbox/local/pathdef.m. What I did to fix it is run

julia> mat"path(pathdef)"

within julia (or alternatively open the matlab session window and enter the command there). After running this SDPNAL is called successfully.

odow commented 11 months ago

Closing as stale. If anyone else comes across this, please comment and we'll improve the installation instructions: https://github.com/jump-dev/SDPNAL.jl#installation