PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

large executables for static memory allocation

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
marhae



Joined: 18 May 2006
Posts: 1

PostPosted: Fri May 19, 2006 12:10 am    Post subject: large executables for static memory allocation Reply with quote

I compiled a fortran90 code with static memory allocation.
The size of the executable strongly depends on the predefined size of the arrays which appear in the program. The executable can have a size of some 100 MB while with other compilers itīs always 1 MB.
Is there an option to fix that?
(version: 5.2-4 linux )
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6134
Location: The Portland Group Inc.

PostPosted: Fri May 19, 2006 2:29 pm    Post subject: Reply with quote

Hi Marhae,

On Linux, large static arrays can cause your objects to grow quite large if you initalize them in the declaration. For each element of your array, an assembly instruction must be generated to perform the intialization. So the size of the object grows as the number of elements grows. The solution is to initialize your arrays at runtime using loops.

Hope this helps,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group