Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



33 Commits

Repository files navigation


SDPT3.jl is wrapper for the SDPT3 solver.

The wrapper has two components:

  • an exported sdpt3 function that is a thin wrapper on top of the sdpt3 MATLAB function
  • an interface to MathOptInterface


This wrapper is maintained by the JuMP community and is not an official wrapper of SDPT3.


SDPT3.jl is licensed under the MIT License.

The underlying solver, SDPT3 is licensed under the GPL v2 License.

In addition, SDPT3 requires an installation of MATLAB, which is a closed-source commercial product for which you must obtain a license.

Use with JuMP

To use SDPT3 with JuMP, do:

using JuMP, SDPT3
model = Model(SDPT3.Optimizer)
set_attribute(model, "printlevel", 0)


First, make sure that you satisfy the requirements of the MATLAB.jl Julia package, and that the SeDuMi software is installed in your MATLAB™ installation.

Then, install SDPT3.jl using Pkg.add:

import Pkg

SDPT3 not in PATH

If you get the error:

Error using save
Variable 'jx_sdpt3_arg_out_1' not found.

ERROR: LoadError: MATLAB.MEngineError("failed to get variable jx_sdpt3_arg_out_1 from MATLAB session")

The error means that we could not find the sdpt3 function with one output argument using the MATLAB C API. This most likely means that you did not add SDPT3 to the MATLAB's path (that is, the toolbox/local/pathdef.m file).

If modifying toolbox/local/pathdef.m does not work, the following should work, where /path/to/sdpt3/ is the directory where the sdpt3 folder is located:

julia> using MATLAB

julia> cd("/path/to/sdpt3/") do

julia> MATLAB.mat"savepath"

An alternative fix is suggested in the following issue.

Error in validate

If you get the error:

Brace indexing is not supported for variables of this type.

Error in validate

Error in sdpt3 (line 171)
   [blk,At,C,b,blkdim,numblk,parbarrier] = validate(blk,At,C,b,par,parbarrier);

Error using save
Variable 'jx_sdpt3_arg_out_1' not found.

It might mean that you have added SDPNAL in addition to SDPT3 in the MATLAB's path (that is, the toolbox/local/pathdef.m file). Because SDPNAL also defines a validate function, this can make sdpt3 call SDPNAL's validate function instead of SDPT3's validate function, which causes the issue.

One way to fix this from the Julia REPL is to reset the search path to the factory-installed state using restoredefaultpath:

julia> using MATLAB

julia> MATLAB.restoredefaultpath()

julia> MATLAB.mat"savepath"