Skip to content

Commit

Permalink
Clarify troubleshooting (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Oct 27, 2021
1 parent bfb0bd8 commit 306227c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ Stacktrace:
The error means that we try to find the `sdpt3` function with 1 output argument using the MATLAB C API but it wasn't found.
This most likely means that you did not add SDPT3 to the MATLAB's path (i.e. 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
julia> using MATLAB

julia> cd("/path/to/sdpt3/") do
mat"install_sdpt3"
end
```
This should make `SDPT3.jl` work for the Julia session in which this is run.
Alternatively, run
```julia
julia> mat"savepath"
```
to make `SDPT3.jl` work for future Julia sessions.

An alternative fix is suggested in the [following issue](https://github.com/jump-dev/SDPT3.jl/issues/9#issuecomment-855509257).

#### Error in validate

If you get the error:
Expand All @@ -63,3 +80,14 @@ Variable 'jx_sdpt3_arg_out_1' not found.
```
It might means that you have added [SDPNAL](https://github.com/jump-dev/SDPNAL.jl) in addition to SDPT3 in the MATLAB's path (i.e. the `toolbox/local/pathdef.m` file).
As SDPNAL also define a `validate` function, this makes `sdpt3` calls 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
julia> using MATLAB

julia> restoredefaultpath
```
For this to affect future Julia sessions, use
```julia
julia> mat"savepath"
```

0 comments on commit 306227c

Please sign in to comment.