Expanding allocated memory

Hi guys,

I have the following problem. In running a model, I get the following message:

*** Out of Memory in New or GetMem.
*** Out of Memory while executing line 1202
*** HeapLimit = 1E20 HeapSize = 3779.36844

that, I think, means that the allocated memory has reached its limit. Someone else has already encountered the same problem and posted it. The answer she/he received is the following:

It is possible to extend this limit by setting the environment variable LDR_CNTRL. For example, to increase the limit to 20GB, one would set (on bash):

export LDR_CNTRL=MAXDATA=0x800000000

Alternatively, it is possible to edit the information on the limit in the GAMS executable via the ldedit tool:

ldedit -b maxdata:0x800000000 gamscmex.out


Nice, but since I am a very rookie pc user, I have no idea on how to perform these suggestions. I foolishly tried to copy and paste the two lines (expory…and ldedit…) on the gams executable (where I have the model), but this does not work. They are not recognized.


Please, can someone explain me, preferibly in a simple and step by step way, where to go and to write these commands?


Thanks a lot,


Marco

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Marco,

The suggestions you quote are for the Unix AIX platform. You write “I am a very rookie pc user”, so I assume this means Window (or perhaps Linux or Mac) user and hence this suggestion would not apply to your situation. You just might run out of physical memory with an innocently looking GAMS statement that tries to allocate plenty of memory (e.g. x.up(i,j,k,l) = 1;). Best you send the entire log and your GAMS model, so we all can be of more help.

Michael Bussieck - GAMS World Coordinator

On Tuesday, December 22, 2015 at 9:09:42 AM UTC-5, Marco R. wrote:

Hi guys,

I have the following problem. In running a model, I get the following message:

*** Out of Memory in New or GetMem.
*** Out of Memory while executing line 1202
*** HeapLimit = 1E20 HeapSize = 3779.36844

that, I think, means that the allocated memory has reached its limit. Someone else has already encountered the same problem and posted it. The answer she/he received is the following:

It is possible to extend this limit by setting the environment variable LDR_CNTRL. For example, to increase the limit to 20GB, one would set (on bash):

export LDR_CNTRL=MAXDATA=0x800000000

Alternatively, it is possible to edit the information on the limit in the GAMS executable via the ldedit tool:

ldedit -b maxdata:0x800000000 gamscmex.out


Nice, but since I am a very rookie pc user, I have no idea on how to perform these suggestions. I foolishly tried to copy and paste the two lines (expory…and ldedit…) on the gams executable (where I have the model), but this does not work. They are not recognized.


Please, can someone explain me, preferibly in a simple and step by step way, where to go and to write these commands?


Thanks a lot,


Marco

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Marco

You are a PC user so anything related to gamscmex.out is not relevant for you. That’s a file in the UNIX distros. My guess is you are running a 32-bit system on a 64-bit OS. You cannot address or allocate more than 4GB in that case.

Can you send the version info from your GAMS system?

Steve

Sent from my iPhone

On Dec 22, 2015, at 09:09, Marco R. wrote:

Hi guys,

I have the following problem. In running a model, I get the following message:

*** Out of Memory in New or GetMem.
*** Out of Memory while executing line 1202
*** HeapLimit = 1E20 HeapSize = 3779.36844

that, I think, means that the allocated memory has reached its limit. Someone else has already encountered the same problem and posted it. The answer she/he received is the following:

It is possible to extend this limit by setting the environment variable LDR_CNTRL. For example, to increase the limit to 20GB, one would set (on bash):
export LDR_CNTRL=MAXDATA=0x800000000

Alternatively, it is possible to edit the information on the limit in the GAMS executable via the ldedit tool:
ldedit -b maxdata:0x800000000 gamscmex.out

Nice, but since I am a very rookie pc user, I have no idea on how to perform these suggestions. I foolishly tried to copy and paste the two lines (expory…and ldedit…) on the gams executable (where I have the model), but this does not work. They are not recognized.

Please, can someone explain me, preferibly in a simple and step by step way, where to go and to write these commands?

Thanks a lot,

Marco


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Michael and Steven,

so, we have definitely proved that I am a rookie pc user and, as such, I am using a Windows pc.

I’ve tried to attach all the possibly interesting files to explain my problem. The first is the gams code with the model and the second the R script that must be run together.

The model in itself is correct. In fact it can be solved for a value of the scalar n equal or lower than 6. The first log PDF file (log1) shows the result when I run the model with n=6.

The second log file, instead, shows a problem, that is not the “Ot of memory” described before, but still GAMS ends up without giving a result. This happens when I set n=7.

Finally, log3 describes the “Out of memory” problem. It is obtained for n=8 or higher.

Other potential useful information are the fact that I am using a pc with 4GB of Ram, so, maybe, expanding the allocated memory does not help much since it will reach the limit of my pc memory in any case (I do not know if the allocated memory we are talking about is the Ram or the Hard disk memory (Rookie pc user).

I am also aware that I am asking a lot to GAMS and to my pc. As you can see I have an MCP problem on a variable defined over 4 dimension. One of them, pp has a dimension equal to the factorial of n. So, for n=6 means 720, for 7 5.040 and, for 8, 40.320. Therefore, it could be that I really want too much.

Ah, last thing: I am using an old version of GAMS, as to say 23.5. I do not know if it is a 32-bit or a 64, but I guess the first

If you have any kind of suggestion to give, it is very welcome.

Thanks again,

Marco

Il giorno martedì 22 dicembre 2015 15:09:42 UTC+1, Marco R. ha scritto:

Hi guys,

I have the following problem. In running a model, I get the following message:

*** Out of Memory in New or GetMem.
*** Out of Memory while executing line 1202
*** HeapLimit = 1E20 HeapSize = 3779.36844

that, I think, means that the allocated memory has reached its limit. Someone else has already encountered the same problem and posted it. The answer she/he received is the following:

It is possible to extend this limit by setting the environment variable LDR_CNTRL. For example, to increase the limit to 20GB, one would set (on bash):

export LDR_CNTRL=MAXDATA=0x800000000

Alternatively, it is possible to edit the information on the limit in the GAMS executable via the ldedit tool:

ldedit -b maxdata:0x800000000 gamscmex.out


Nice, but since I am a very rookie pc user, I have no idea on how to perform these suggestions. I foolishly tried to copy and paste the two lines (expory…and ldedit…) on the gams executable (where I have the model), but this does not work. They are not recognized.


Please, can someone explain me, preferibly in a simple and step by step way, where to go and to write these commands?


Thanks a lot,


Marco

\

analyticp3.gms (9.11 KB)
partitionsgdx.R (826 Bytes)
Log1.pdf (47.9 KB)
Log2.pdf (45.5 KB)
Log3.pdf (40.5 KB)