[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Help-glpk] Problems in using GLPK on MATLAB
From: |
#LI WEN# |
Subject: |
RE: [Help-glpk] Problems in using GLPK on MATLAB |
Date: |
Sun, 6 Feb 2011 17:13:28 +0000 |
Hi, Robbie,
Thanks for your advice. I just solved my problems.
1. compile glpkmex v2.8.
My problem is when I run the makeglpkmex.m, I cannot find the required
'libglpk.a'. I think it should be the library file. So I replaced with glpk.lib
which is under the GLPK directory (I installed GLPK v4.34 on my PC, which is
downloaded from http://gnuwin32.sourceforge.net/packages/glpk.htm). However, it
doesn't work.
So I downloaded the latest source code, and compile it to get a glpk.lib.
With this glpk.lib, I successfully compiled glpkmex v2.8.
Despite the version problem, I found that the glpk.lib file under the GLPK
installation directory is quite small (55KB), compared with the glpk.lib
compiled by myself(>2MB). Actually, I compiled the source code of GLPK v4.34,
which is the same version with the one I installed. The glpk.lib file is above
1MB. But glpkmex v2.8 only works on glpk whose version is higher than 4.36.
2. compile my glpkmex file.
I have a different interface file, which comes from another program I
downloaded. When I tried to compile it, I got some errors as follows:
> ----------------------------
> glpkmex.c
> glpkmex.c(457) : warning C4090: 'function' : different 'const'
> qualifiers
> glpkmex.c(141) : warning C4101: 'mxtmp' : unreferenced local variable
> glpkmex.c(139) : warning C4101: 'mxlambda' : unreferenced local
> variable
> glpkmex.c(581) : warning C4013: 'insist' undefined; assuming extern
> returning int
> glpkmex.c(623) : warning C4013: 'lib_env_ptr' undefined; assuming
> extern returning int
> glpkmex.c(623) : error C2223: left of '->mem_tpeak' must point to
> struct/union
>
> C:\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of 'glpkmex.c' failed.
>
> ??? Error using ==> mex at 222
> Unable to complete successfully.
> ------------------------------
I searched on Google, and found it might due to the version problem. Some
functions such as lib_env_ptr and insist are not supported anymore in new
versions. They are supported in versions ealier than 4.14 (which is quite old).
Now I think I should modify the program to use glpkmex v2.8 or compile the
older version glpk. I prefer the former one, as it is said there're some memory
bugs in older version.
Thank all of you for your helps.
Best regards,
LI Wen
-----Original Message-----
From: Robbie Morrison [mailto:address@hidden
Sent: 2011年2月6日 22:59
To: #LI WEN#
Subject: re: [Help-glpk] Problems in using GLPK on MATLAB
Hi Li (off-line)
If you solve your problem, can you post back to the
[Help-glpk] list. Or if you find out anything useful.
I will then update the GLPK wikibook page:
http://en.wikibooks.org/wiki/GLPK/Matlab#GLPKMEX
I don't use MATLAB these days. But I guess you
may need to work on the GLPKMEX code to bring
it up to date?
best wishes
Robbie
> ------------------------------------------------------------
> To: Noli Sicad <address@hidden>
> Subject: RE: [Help-glpk] Problems in using GLPK on MATLAB
> From: #LI WEN# <address@hidden>
> Date: Sun, 6 Feb 2011 10:01:13 +0000
> ------------------------------------------------------------
>
> OK. Thank you so much.
>
> Best regards,
> LI Wen
>
> -----Original Message-----
> From: Noli Sicad [mailto:address@hidden
> Sent: 2011??2??6?? 17:52
> To: #LI WEN#
> Cc: address@hidden
> Subject: Re: [Help-glpk] Problems in using GLPK on MATLAB
>
> Hi Li,
>
> Please read the archive about the problems in installing glpkmex.
>
> http://www.mail-archive.com/search?q=glpkmex&l=help-glpk%40gnu.org
>
> I hope you can find the solution in the previous postings.
>
> I am not a glpkmex user.
>
> Noli
>
> On 2/6/11, #LI WEN# <address@hidden> wrote:
>> Hi, Noli,
>>
>> Thanks very much for your helps.
>>
>> Actually I don't know what's the version of the glpkmex I'm using, as
it is
>> provided in the source code of the program I'm trying to compile now. The
>> interface is different from the popular glpkmex (i.e. the one you
gave). But
>> now I am trying to use the glpkmex you provided.
>
> [snip - GLPKMEX experiences]
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Institute for Energy Engineering (IET)
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred) : address@hidden
[from Webmail client]
- RE: [Help-glpk] Problems in using GLPK on MATLAB,
#LI WEN# <=