Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 ディスカッション

relocation truncated to fit

zuibeidemei
ビギナー
487件の閲覧回数
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 件の賞賛
1 返信
Ron_Green
モデレーター
487件の閲覧回数
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?
返信