A Makefile (in a command line not within Matlab) to compile sedumi using gcc (Apple LLVM version 9.1.0 (clang-902.0.39.1)) and intel compiler (icc (ICC) 17.0.4 20170411). It worked flawlessly on my mac running Matlab 2017b.
All the necessary information and source code were retrieved from sedumi fork. Please visit that web page for the necessary information
To get the makefile working (icc and gcc problems) I had to create new header files and modify some c sources.
blkmul.c
- Add line "int blkmulsize;"
- Fix line "nL = (mwindex *) mxCalloc(MAX(1,kappa), sizeof(mwIndex));" mwIndex and not mwindex
symbchol.c
- Line "perm = (mwIndex *) mxCalloc(m,sizeof(mwIndex));" -> add perm to the list of mwIndex vars
- Line "iwork = (mwIndex *) mxCalloc(iwsiz,sizeof(mwIndex));"-> ditto
- Line "xlindx = (mwIndex *) mxCalloc(m+1,sizeof(mwIndex));" -> ditto
- Lir, Ljc are not declated -> int *Lir, *Ljc and then (int *) mxCalloc(m+1,sizeof(int));
- #include "symbchol.h"
Obs.: I am not sure about the sizes of Lir and Ljc
symbchol.h
The header file was created to remove the compilation error when using gcc. An implicit declation of a function was added as follows:
void getadj(mwIndex *forjc,mwIndex *forir,const mwIndex *cjc,const mwIndex *cir,const mwIndex n);
blkchol.h
"touch blkchol.h" (Perhaps the authors forgot to remove this header from some of the files"
##Instructions:
To create mex functions do:
- Go to sedumi-master dir
- Make the changes in the files listed above and create the header files.
- Issue make all (to create all obj files and mex binaries)