Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28591 Discussions

Error: additional relocation overflows omitted from the output

shawn_x_
Beginner
8,831 Views

Hello,

 

I am currently developing a Fortran77 code for computational fluid dynamics (CFD).

Environment: SUSE Linux Enterprise Server 10 SP2 (x86_64), Intel ifort, Fortran77

 

I do have to use a huge array in my code which results in error.

This array used in my code has 250,000*42*18=189,000,000 elements.

Compile error message: “additional relocation overflows omitted from the output”, 

“relocation truncated to fit: R_X86_64_32S against symbol `kiva6_' defined in COMMON section in…”

 

While, codes with smaller array, such as 120,000*42*18=90,720,000 , will be successfully compiled.

 

This problem is not rare. I have tried to solve it with the help of Google.

FFlags in makefile is initially “-r8 -132”. In order to solve this problem, “-mcmodel=medium”, ” -i-dynamic” and “shared-intel” were added. Unfortunately, the problem remains.

 

Would you please give me some comments? I’m looking forward and will be very grateful to your reply.

 

Please let me know if you need more information.

 

Thanks a lot.

 

Xiao

 

PhD Student in Engineering

0 Kudos
1 Solution
Ron_Green
Moderator
8,831 Views

Xiao,

Static data, such as COMMON variables, and all your code together is still limited to 2GB under any mcmodel.  To avoid this, move the data out of a COMMON block and into a module and make the data allocatable.  Then allocate what you need.  The limit to data size for allocatable data is set by the size of physical memory (RAM) + swap space.  In practice, I target 80% of physical RAM as an upper limit to my data declarations.  This leaves room for OS buffers, MPI buffers, etc. and prevents the code from paging.

So COMMON is your issue.  Move the data out of common or live with a total of 2GB for all COMMON, static varialbles and code.

ron

View solution in original post

0 Kudos
2 Replies
Ron_Green
Moderator
8,832 Views

Xiao,

Static data, such as COMMON variables, and all your code together is still limited to 2GB under any mcmodel.  To avoid this, move the data out of a COMMON block and into a module and make the data allocatable.  Then allocate what you need.  The limit to data size for allocatable data is set by the size of physical memory (RAM) + swap space.  In practice, I target 80% of physical RAM as an upper limit to my data declarations.  This leaves room for OS buffers, MPI buffers, etc. and prevents the code from paging.

So COMMON is your issue.  Move the data out of common or live with a total of 2GB for all COMMON, static varialbles and code.

ron

0 Kudos
shawn_x_
Beginner
8,831 Views

Ronald W Green (Intel) wrote:

Xiao,

Static data, such as COMMON variables, and all your code together is still limited to 2GB under any mcmodel.  To avoid this, move the data out of a COMMON block and into a module and make the data allocatable.  Then allocate what you need.  The limit to data size for allocatable data is set by the size of physical memory (RAM) + swap space.  In practice, I target 80% of physical RAM as an upper limit to my data declarations.  This leaves room for OS buffers, MPI buffers, etc. and prevents the code from paging.

So COMMON is your issue.  Move the data out of common or live with a total of 2GB for all COMMON, static varialbles and code.

ron

 

Thank you very much. It really helps me.

0 Kudos
Reply