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

relocation truncated to fit

zuibeidemei
Beginner
280 Views
Hi
My program is a combined with C and Fortran, Now I have a problem.
When I try to increase some array to larger size, when it comes to link, it throws "relocation truncated to fit"
I know this is because I have larger static memory request, so I check the compiler options,
it says I should use mcmodel=medium(large) --shared-intel as a part of my options.
Then I add this to only ifort, (no icc), then some c program complains about the same problem
If add this option to both C and Fortran, then the link will still collapse with some *.o not found (it actuall exist)
Actually, in my program, C is only for some low level handling likeL time management
THe large array comes from Fortran part.
Hope someone may help me. Thanks.
--
All the best!
0 Kudos
1 Reply
Ron_Green
Moderator
280 Views
the C and Fortran will have to use the same -mcmodel=medium(large) - this dictates data pointer sizes and those have to match.

What error do you get on link when you do that? Can you set the path to the missing .o file manually? And are you sure that you did the 'source /opt/intel/bin/compilervars.sh intel64' first?
0 Kudos
Reply