help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] ufopen: too many open files


From: Brady Hunsaker
Subject: Re: [Help-glpk] ufopen: too many open files
Date: Fri, 15 Oct 2004 22:13:53 -0400

On Mon, 2004-10-04 at 17:43, Marcos Roberto Silva wrote:
> Dear Friends,
> I have this error output for my simple C code that read a .mod file and 
> the data file and solve the (new) problem at each update of parameter data.
> What's wrong?
> Thanks.

GLPK has a limit of 20 files simultaneously open for i/o.  The error
means that GLPK thinks you are trying to use more than this.

Looking through the source, I think it's probably the calls to
mpl_generate.  These open files for output, and they are probably never
closed.  At the end of your loop, you should call mpl_terminate(mpl) to
free all the resources before starting again.  That will close the
output file.

If that is indeed the problem, then you may have had other memory leaks
as well resulting from not calling mpl_terminate.

Brady

> Marcos Roberto Silva
> 
> The API's functions used are (glpk-4.7):
> 
>     mpl = mpl_initialize();
>     ret = mpl_read_model(mpl, "bi_ap.mod", 0);
>     ret = mpl_read_data(mpl, "data");
>     ret = mpl_generate(mpl, "ver.txt");
>     lp = lpx_extract_prob(mpl);
>     lpx_simplex(lp);






reply via email to

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