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

problem about compiling program using more than 2G memory

Chang_Lei
Beginner
507 Views
The system environment is Intel XeonE5450,16GB memory,Redhat Enterprise Linux 5.2,Intel Fortran Compiler 10.1. When using command "ifort -V", given information is"Intel Fortran Compiler for applications running on Intel 64, Version 10.1.....".

When I compile my program with "ifort myprogram1.f90...output.f90..",after begining loop vectorize information, it gave these errors:

/tmp/ifortkogmY8.o: In function `output_continue_':
output.f90:(.text+0x994): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
output.f90:(.text+0x9be): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_v_drop1_':
output.f90:(.text+0xadf): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_v_drop_':
output.f90:(.text+0xd43): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_u1_':
output.f90:(.text+0xf6d): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_front1_':
output.f90:(.text+0x15e1): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
output.f90:(.text+0x162f): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_front_':
output.f90:(.text+0x2633): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
output.f90:(.text+0x2681): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortkogmY8.o: In function `output_':
output.f90:(.text+0x35a8): relocation truncated to fit: R_X86_64_PC32 against symbol `temporal_' defined in COMMON section in /tmp/ifortszBqBU.o
/tmp/ifortitg63W.o: In function `MAIN__':
main.f90:(.text+0x606): additional relocation overflows omitted from the output

"output.f90" is my code inculuding several output subroutines such as " output_continue,output_v_drop..." and so on. It seems that the problem is about COMMON section in which lots of big matrixes are defined. The total using memory exceed 2G. When I added compileoption "-mcmodel medium", the error info changed to:

/opt/intel/fce/10.1.021/lib/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/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
/opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o): In function `for__io_return':
for_diags_intel.c:(.text+0x889): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xa11): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xa1a): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xa6b): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
/opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o): In function `for__issue_diagnostic':
for_diags_intel.c:(.text+0xb96): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xea0): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xea9): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0xfb9): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
/opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o): In function `get_message':
for_diags_intel.c:(.text+0x10fa): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /opt/intel/fce/10.1.021/lib/libifcore.a(for_diags_intel.o)
for_diags_intel.c:(.text+0x124e): additional relocation overflows omitted from the output

The problem still exists.
Anyone could give help is appreciated so much.
0 Kudos
1 Solution
Xiaoping_D_Intel
Employee
507 Views
When you specify -mcmodel=medium or -mcmodel=large, you must also specify compiler option -shared-intel to ensure that the correct dynamic versions of the Intel run-time libraries are used.

Thanks,
Xiaoping

View solution in original post

0 Kudos
5 Replies
Xiaoping_D_Intel
Employee
508 Views
When you specify -mcmodel=medium or -mcmodel=large, you must also specify compiler option -shared-intel to ensure that the correct dynamic versions of the Intel run-time libraries are used.

Thanks,
Xiaoping
0 Kudos
Chang_Lei
Beginner
507 Views

That works.
Thanks.
And be sure there is no space between"-shared" and "-intel", I have made this mistake before.
0 Kudos
Chang_Lei
Beginner
507 Views
I have new question. When I added the "-fast" option, it gave errors:

/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_global_thread_num':
../kmp_csupport.c:(.text+0x3a): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_init_serial' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_global_num_threads':
../kmp_csupport.c:(.text+0x5a): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_nth' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_bound_thread_num':
../kmp_csupport.c:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_init_serial' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
../kmp_csupport.c:(.text+0x7d): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_threads' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
../kmp_csupport.c:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_threads' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_bound_num_threads':
../kmp_csupport.c:(.text+0xba): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_init_serial' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
../kmp_csupport.c:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_init_parallel' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
../kmp_csupport.c:(.text+0xd0): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_threads' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_in_parallel':
../kmp_csupport.c:(.text+0x10a): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_init_serial' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
../kmp_csupport.c:(.text+0x11a): relocation truncated to fit: R_X86_64_PC32 against symbol `__kmp_threads' defined in .bss section in /opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_global.o)
/opt/intel/cmkl/9.0/lib/em64t//libguide.a(kmp_csupport.o): In function `__kmpc_serialized_parallel':
../kmp_csupport.c:(.text+0x285): additional relocation overflows omitted from the output

Does-fast option conflict with other options?
The whole compilecommand is: ifort -openmp -mcmodel=medium -shared-intel -fast ... myprogram.f90...
With best regards.
0 Kudos
Xiaoping_D_Intel
Employee
507 Views
"-fast" will enable -ipo, -O3, -no-prec-div, -static, and -xHost".
0 Kudos
Chang_Lei
Beginner
507 Views
I see.-static conflict with -shared-intel.
Thanks.
0 Kudos
Reply