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

Please help: fortran compile error

pangyatou
Beginner
282 Views

I am a new user for the fortran. When I compile my code, I got this error message:

======================================

/tmp/ifort1nztqP.o(.text+0x19): In function `fpres_':
: relocation truncated to fit: R_X86_64_32S fields_
/tmp/ifort1nztqP.o(.text+0x21): In function `fpres_':
: relocation truncated to fit: R_X86_64_32S __BLNK__

.........................similar lines........................

/tmp/ifort1nztqP.o(.text+0x405): In function `fpres_':
: relocation truncated to fit: R_X86_64_32S __BLNK__
/tmp/ifort1nztqP.o(.text+0x40f): In function `fpres_':
: additional relocation overflows omitted from the output
========================================

Old code: I have an old version of the code, in which, it uses unrolling loop as follows:

do i=1,64,8

x(i)=y(i);x(i+1)=y(i+1);x(i+2)=y(i+2);x(i+3)=y(i+3);x(i+4)=y(i+4);x(i+5)=y(i+5);x(i+6)=y(i+6);

x(i+7)=y(i+7);

enddo

For this old code, for the size 256^3, it can be compiled without any errors.

New code: But, after I change it to the following newway(delete the unrolling loop), I got the above error message.

do i=1,64

x(i)=y(i)

enddo

My confusion is: After I delete the unrolling loop, but decrease the computing size from 256^3 to 128^3, the new code can be compiled without any error. But when I increase the size back to 256^3, above error messages showed up.

Could anyone please explain what does this error message mean? Could you please teach me how to find where the problem is in my code?

thanks a lot!!

0 Kudos
1 Reply
Steven_L_Intel1
Employee
282 Views
This is a linker (ld) error, not a compiler error. Does building with "-mcmodel medium" help?
0 Kudos
Reply