bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] glpkmex for 64 bit architecture


From: Waqar Malik
Subject: [Bug-glpk] glpkmex for 64 bit architecture
Date: Mon, 7 Jan 2008 17:51:40 -0800 (PST)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]