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

problems with -shared-intel -mcmodel-large

gogo
Beginner
1,097 Views
I am compiling a Fortran 77 code that contains large common blocks and thus I'm using -mcmodel=large and -shared-intel command line options. However, I'm still getting symbol relocation errors (see output below). It looks like the linker is still attempting to use at least one static library (libifcore.a).

The same problem does NOT occur when compiling with gfortran (same command line options except for -shared-intel). I am using Ubuntu 8.10/kernel 2.6.27 on an intel64 platform. Compiler version is 11.0.081.

Any suggestions?

--George

===========
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o code_larger_array.o -c code_larger_array.f
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o utility.o -c utility.f
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o optmiz.o -c optmiz.f
ifort -o code_large code_larger_array.o utility.o optmiz.o

/opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__message_catalog_close':
for_diags_intel.c:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
/opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__io_return':
for_diags_intel.c:(.text+0x82a): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_len' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x831): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_buf' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x9ae): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_len' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x9b5): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_buf' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xb10): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xb53): relocation truncated to fit: R_X86_64_PC32 against `tmp_ptr.0'
for_diags_intel.c:(.text+0xbd8): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xc0a): relocation truncated to fit: R_X86_64_PC32 against `tmp_sev.0'
for_diags_intel.c:(.text+0xc1d): relocation truncated to fit: R_X86_64_PC32 against `tmp_ptr.0'
for_diags_intel.c:(.text+0xc29): additional relocation overflows omitted from the output
make: *** [chr1D_large] Error 1
0 Kudos
2 Replies
Ron_Green
Moderator
1,097 Views
I am compiling a Fortran 77 code that contains large common blocks and thus I'm using -mcmodel=large and -shared-intel command line options. However, I'm still getting symbol relocation errors (see output below). It looks like the linker is still attempting to use at least one static library (libifcore.a).

The same problem does NOT occur when compiling with gfortran (same command line options except for -shared-intel). I am using Ubuntu 8.10/kernel 2.6.27 on an intel64 platform. Compiler version is 11.0.081.

Any suggestions?

--George

===========
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o code_larger_array.o -c code_larger_array.f
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o utility.o -c utility.f
ifort -g -shared-intel -shared-libgcc -mcmodel=large -o optmiz.o -c optmiz.f
ifort -o code_large code_larger_array.o utility.o optmiz.o

/opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__message_catalog_close':
for_diags_intel.c:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
/opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__io_return':
for_diags_intel.c:(.text+0x82a): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_len' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x831): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_buf' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x9ae): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_len' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x9b5): relocation truncated to fit: R_X86_64_PC32 against symbol `for__user_iomsg_buf' defined in .bss section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xb10): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xb53): relocation truncated to fit: R_X86_64_PC32 against `tmp_ptr.0'
for_diags_intel.c:(.text+0xbd8): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/Compiler/11.0/081/lib/intel64/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xc0a): relocation truncated to fit: R_X86_64_PC32 against `tmp_sev.0'
for_diags_intel.c:(.text+0xc1d): relocation truncated to fit: R_X86_64_PC32 against `tmp_ptr.0'
for_diags_intel.c:(.text+0xc29): additional relocation overflows omitted from the output
make: *** [chr1D_large] Error 1

The LINK needs -shared-intel: this is done by the last 'ifort -o large_code .... ' command in your sequence above.

Also, why are you using mcmodel=large and not =medium? Do you really have over 2GB of compiled code - not data, but code: your text segment (see the 'size' command in linux). I'd recommend using the medium model.

ron
0 Kudos
gogo
Beginner
1,097 Views

The LINK needs -shared-intel: this is done by the last 'ifort -o large_code .... ' command in your sequence above.

Also, why are you using mcmodel=large and not =medium? Do you really have over 2GB of compiled code - not data, but code: your text segment (see the 'size' command in linux). I'd recommend using the medium model.

ron

Yes, of course! I guess I should have had my coffee first and post my question second :) Thanks for your quick response.

Regarding mcmodel=large -- indeed, there is no reason to use it as my code is barely 1MB in size. I was simply hacking with it, since mcmodel=medium didn't seem to work.

Thanks again,
George
0 Kudos
Reply