Jump to content
qingwen.ye@gmail.com

Out of memory issue related to SC_MODULE's size

Recommended Posts

Hi All,
 
Do you have any comments on the issue below?
 
We have a very big SC_MODULE (auto generated), we split it into 28 cpp files. and the SC_CTOR has about 100K lines.
 
We compile the design on a 32GB Linux server, and get out of memory error:
 
cc1plus.exe: out of memory allocating 33554432 bytes
make: *** [obj/ldpc_decoder_core_1.o] Error 1
 
 
thanks,
Qingwen
 
 

 

Share this post


Link to post
Share on other sites

Well, your compiler runs out of memory.  As it seems that your host may have enough memory, make sure that the user memory limits (ulimit -v -m) are not getting in your way.

That said, 100k lines in a single function is quite a lot.  We had similar problems with synthesized code at some point in the past and split the results in multiple functions instead.  You might want to split your constructor here by creating a set of "init" functions that are called in sequence and put those functions in separate files as well.

 

Greetings from Oldenburg,
  Philipp

Share this post


Link to post
Share on other sites

 

Hi All,
 
Do you have any comments on the issue below?
 
We have a very big SC_MODULE (auto generated), we split it into 28 cpp files. and the SC_CTOR has about 100K lines.
 
We compile the design on a 32GB Linux server, and get out of memory error:
 
cc1plus.exe: out of memory allocating 33554432 bytes
make: *** [obj/ldpc_decoder_core_1.o] Error 1
 
 
thanks,
Qingwen
 
 

 

 

I am curious, if as you say you are running on a 32 GB Linux

server, your executable is named "cc1plus.exe:" ? Are you

sure it is not a Windows machine ? Why the ".exe" ?

Share this post


Link to post
Share on other sites

Hi Philipp,

 

       Thanks for the suggestions, we will try to split the constructors.

 

thanks

 

 

Well, your compiler runs out of memory.  As it seems that your host may have enough memory, make sure that the user memory limits (ulimit -v -m) are not getting in your way.

That said, 100k lines in a single function is quite a lot.  We had similar problems with synthesized code at some point in the past and split the results in multiple functions instead.  You might want to split your constructor here by creating a set of "init" functions that are called in sequence and put those functions in separate files as well.

 

Greetings from Oldenburg,
  Philipp

Share this post


Link to post
Share on other sites

Hi, yes, you are right, it was on Win 7 Platform, which has 32GB memory. 

 

I would suggest you also try 64bits Linux as I assume you are using gcc under Mingw-w64 which is still considered somewhat unstable.

Good luck,

 

Hans

www.ht-lab.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×