help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Memory Corruption inside glp_simplex


From: glpk xypron
Subject: Re: [Help-glpk] Memory Corruption inside glp_simplex
Date: Fri, 11 Nov 2011 23:22:24 +0100

Hello Raniere,

the documentation in
glpk-4.47\doc\glpk.pdf
describes that function glp_mat_get_col may return
1 + number of rows
values.

You allocate memory for
1 + number of integer columns
values.

Use function glp_get_num_rows to retrieve the number of rows.

Do not forget to delete the problem with glpk_delete_prob.

Best regards

Xypron
-------- Original-Nachricht --------
> Datum: Thu, 10 Nov 2011 21:08:00 -0200
> Betreff: [Help-glpk] Memory Corruption inside glp_simplex

> Hello,
> I'm trying to implement a heuristic for a MIP and need to get some
> informations about the problem and use the function glp_simplex several
> times.
> Unfortunately when I call glp_simplex after call glp_get_mat_col I get a
> memory curruption erro.
> 
> Below I paste part of the erro get when I run the attached files of a
> minimal file.
> 
> $ ./test exemp01.mps
> Reading problem data from `exemp01.mps'...
> Problem: exemp03
> Objective: z
> 3 rows, 2 columns, 6 non-zeros
> 2 integer variables, none of which are binary
> 25 records were read
> GLPK Simplex Optimizer, v4.47
> 3 rows, 2 columns, 6 non-zeros
> *     0: obj =   0.000000000e+00  infeas =  0.000e+00 (0)
> *     2: obj =  -1.055555556e+02  infeas =  0.000e+00 (0)
> OPTIMAL SOLUTION FOUND
> GLPK Simplex Optimizer, v4.47
> 3 rows, 2 columns, 6 non-zeros
> *** glibc detected *** ./test: malloc(): memory corruption:
> 0x0000000000ac9f10 ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7fc52edfcd7a]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7fc52edff31e]
> /usr/local/lib/libglpk.so.0(glp_malloc+0x8d)[0x7fc52f14592d]
> /usr/local/lib/libglpk.so.0(+0x948e8)[0x7fc52f1ab8e8]
> /usr/local/lib/libglpk.so.0(glp_simplex+0x75b)[0x7fc52f123d7b]
> ./test[0x400892]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7fc52eda1eff]
> ./test[0x4006a9]
> 
> Thanks,
> Raniere Gaia Costa da Silva

-- 
Follow me at http://twitter.com/#!/xypron

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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