Re: GLPK memory problem

2022-07-03 Thread Michael Hennebry

This is a bit late.

On Wed, 4 May 2022, Domingo Alvarez Duarte wrote:

You are right about the maximum index is limited by using an 32 bits integer 
but that doesn't mean that the memory allocation is also limited, we can have 
several GigaBytes of allocated memory on 64 bits platforms and still have 
less that 2^32 indices.


GLPK's xmalloc and xcalloc each take an int as its parameter.
Most ints can represent up to 2**31-1 .

Changing their parameters and a small amount of other code
would likely enlarge the available memory.
It would not solve the indexing issue.

xmalloc and xcalloc go through some gyrations to
ensure that the memory requested is a multiple of 16.
This seems unnessary.
The stated reason is already incorporated int malloc and calloc.

malloc and calloc return either NULL or
a pointer to suitably aligned memory.
Even if an odd block is requested,
there is no way for the immediately following byte to be allocated.

The code likely does little harm.
I'd remove it to reduce the code size.

--
Michael   henne...@web.cs.ndsu.nodak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
 --  someeecards



Re: GLPK memory problem

2022-05-04 Thread Domingo Alvarez Duarte

Hello Andrew !

You are right about the maximum index is limited by using an 32 bits 
integer but that doesn't mean that the memory allocation is also 
limited, we can have several GigaBytes of allocated memory on 64 bits 
platforms and still have less that 2^32 indices.


Cheers !

On 4/5/22 16:10, Andrew Makhorin wrote:

On Tue, 2022-05-03 at 13:29 +0200, Domingo Alvarez Duarte wrote:

Maybe there is a mistake on the previous reply, GLPK is 32/64 bits
depending on the compilation/platform/OS on 64 bits operating systems
it
can allocated more than 4GB of memory.


I meant that for indexing arrays glpk routines use variables of type
int; since int is a 32-bit quantity even in the LP64 programming model,
it is impossible to work with arrays having more than 2^32 elements.
Sorry for misunderstanding.



Can you use gdb to see how much memory was attempted to allocate ?


On 3/5/22 13:11, Andrew Makhorin wrote:

On Tue, 2022-05-03 at 06:38 +, Georgios Avgerinopoulos wrote:

Hey Community!
   
Just ran into the following problem
   

   
glp_alloc: no memory available

Error detected in file ..\src\env\alloc.c at line 91
   
We've got plenty of memory (both RAM and hard drive).
   
Any tips?

GLPK is a 32-bit software, so the addressing memory is limited to 4
Gb.


   
Best,

Georgios
   
+=+

This email is confidential and may be privileged. If you have
received
it in error, please notify us immediately, delete the email, and
do
not
copy it, disclose its contents or use it for any purpose.
+=+






Re: GLPK memory problem

2022-05-04 Thread Andrew Makhorin
On Tue, 2022-05-03 at 13:29 +0200, Domingo Alvarez Duarte wrote:
> Maybe there is a mistake on the previous reply, GLPK is 32/64 bits 
> depending on the compilation/platform/OS on 64 bits operating systems
> it 
> can allocated more than 4GB of memory.


I meant that for indexing arrays glpk routines use variables of type 
int; since int is a 32-bit quantity even in the LP64 programming model,
it is impossible to work with arrays having more than 2^32 elements.
Sorry for misunderstanding.


> 
> Can you use gdb to see how much memory was attempted to allocate ?
> 
> 
> On 3/5/22 13:11, Andrew Makhorin wrote:
> > On Tue, 2022-05-03 at 06:38 +, Georgios Avgerinopoulos wrote:
> > > Hey Community!
> > >   
> > > Just ran into the following problem
> > >   
> > > 
> > >   
> > > glp_alloc: no memory available
> > > Error detected in file ..\src\env\alloc.c at line 91
> > >   
> > > We've got plenty of memory (both RAM and hard drive).
> > >   
> > > Any tips?
> > 
> > GLPK is a 32-bit software, so the addressing memory is limited to 4
> > Gb.
> > 
> > 
> > >   
> > > Best,
> > > Georgios
> > >   
> > > +=+
> > > This email is confidential and may be privileged. If you have
> > > received
> > > it in error, please notify us immediately, delete the email, and
> > > do
> > > not
> > > copy it, disclose its contents or use it for any purpose.
> > > +=+
> 
> 



Re: GLPK memory problem

2022-05-03 Thread Domingo Alvarez Duarte
Maybe there is a mistake on the previous reply, GLPK is 32/64 bits 
depending on the compilation/platform/OS on 64 bits operating systems it 
can allocated more than 4GB of memory.


Can you use gdb to see how much memory was attempted to allocate ?


On 3/5/22 13:11, Andrew Makhorin wrote:

On Tue, 2022-05-03 at 06:38 +, Georgios Avgerinopoulos wrote:

Hey Community!
  
Just ran into the following problem
  

  
glp_alloc: no memory available

Error detected in file ..\src\env\alloc.c at line 91
  
We've got plenty of memory (both RAM and hard drive).
  
Any tips?

GLPK is a 32-bit software, so the addressing memory is limited to 4 Gb.


  
Best,

Georgios
  
+=+

This email is confidential and may be privileged. If you have
received
it in error, please notify us immediately, delete the email, and do
not
copy it, disclose its contents or use it for any purpose.
+=+




Re: GLPK memory problem

2022-05-03 Thread Andrew Makhorin
On Tue, 2022-05-03 at 06:38 +, Georgios Avgerinopoulos wrote:
> Hey Community!
>  
> Just ran into the following problem
>  
> 
>  
> glp_alloc: no memory available
> Error detected in file ..\src\env\alloc.c at line 91
>  
> We've got plenty of memory (both RAM and hard drive).
>  
> Any tips?

GLPK is a 32-bit software, so the addressing memory is limited to 4 Gb.


>  
> Best,
> Georgios
>  
> +=+
> This email is confidential and may be privileged. If you have
> received 
> it in error, please notify us immediately, delete the email, and do
> not 
> copy it, disclose its contents or use it for any purpose.
> +=+