Due to changes in the sparse matric interface in matlab, the current glpkmex
compiles but cannot run the glpksparse.m file.

The command 'mex glpkcc.cpp -lglpk' is succesful but the corresponding
binary gives error when running glpksparse.m

Since matlab r2006b, during compilation -largeArrayDims option has to be
passed. This causes the following error:

mex -largeArrayDims glpkcc.cpp -lglpk
glpkcc.cpp: In function ‘void mexFunction(int, mxArray**, int, const
mxArray**)’:
glpkcc.cpp:489: error: cannot convert ‘mwIndex*’ to ‘int*’ in initialization
glpkcc.cpp:490: error: cannot convert ‘mwIndex*’ to ‘int*’ in initialization

    mex: compile of 'glpkcc.cpp' failed.

changing lines 489 and 490 to 
            mwIndex *jc = mxGetJc(A_IN);
            mwIndex *ir = mxGetIr(A_IN);

and line 500:  nelc=(int) (jc[i]-jc[i-1]);
and line 503:  rn[count]=(int) ir[row]+1;

allows the mex compilation to occur and glpksparse program to run properly.
There may be more changes that may be required and more testing may be
required as I think this may not be the only change that is required.

 


-- 
View this message in context: 
http://www.nabble.com/glpkmex-for-64-bit-architecture-tp14678255p14678255.html
Sent from the Gnu - GLPK - Bugs mailing list archive at Nabble.com.



_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk

Reply via email to