PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

What's "-mcmodel=medium" and "-Mlarge_arrays&

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



Joined: 09 Jul 2004
Posts: 56
Location: Lake Oswego, OR

PostPosted: Fri Jul 16, 2004 1:40 pm    Post subject: What's "-mcmodel=medium" and "-Mlarge_arrays& Reply with quote

I'm not 100% clear on what "-mcmodel=medium" and "-Mlarge_arrays" do. Can someone give an explaination? What impact do they have on performance?
Back to top
View user's profile
mleair



Joined: 19 Jul 2004
Posts: 67
Location: Portland Group

PostPosted: Wed Jul 28, 2004 8:58 am    Post subject: RE: -mcmodel=medium and -Mlarge_arrays Reply with quote

The -mcmodem=medium and -Mlarge_arrays compiler and linker options are supported under 64-bit linux environments (they are not supported under 32-bit linux environments).

The -mcmodel=medium option must be used to compile/link a program whose data and .bss sections exceed 2GB. In order for the program to use these large data sections, additional addressing instructions that support 64-bit offsets need to be generated. The effect this option has on performance is a function of the amount of data-use in the application. Therefore, this option should be used only when the aggregate data size exceeds 2GB.

The -Mlarge_arrays option tells the compiler that you have at least one single static data section (array) larger than 2GB. In this case, array accesses require 64-bit index arithmetic. This option must be used in conjunction with -mcmodel=medium.

A tell tale sign that you might need -mcmodel=medium occurs when you get warnings from the linker that mention "relocation truncated to fit".

There are other limitations to -mcmodel=medium (w.r.t. -fpic or position-independent code, shared libraries, etc.). Refer to the release notes (page 13) for more information:

http://www.pgroup.com/doc/pgiwsrn.pdf

-Mark
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