<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic relocation truncated to fit in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985108#M100606</link>
    <description>&lt;P&gt;I am compiling f90 code with intel 12.1.5 on x86_64 x86_64 x86_64 GNU/Linux and am getting "relocation truncated to fit" errors in the link step, a few of which are copied below. I am using mpif90 with options -O3 -r8 -heap-arrays -mcmodel=medium -shared-intel. I am linking netcdf v4.2.&lt;/P&gt;
&lt;P&gt;As I understand it, this means I am using more than the 2GB limit of statically declared memory. If I execute "size *.o", then sum all numbers in the bss column, I get 94,447,960. I think this means almost 100MB, way&amp;nbsp; under 2 GB. Much of my memory is dynamically allocated from the heap. I doubt netcdf is statically allocated very much, but will try to confirm this. Can anyone help? Thanks,&lt;/P&gt;
&lt;P&gt;--Ben (&lt;A href="mailto:foster@ucar.edu"&gt;foster@ucar.edu&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;mpif90 -r8 -heap-arrays -mcmodel=medium -shared-intel -I. -I/glade/u/home/foster/tiegcm_ctmt/tiegcm_trunk/src -I -O3&amp;nbsp; -DLINUX&amp;nbsp; -DMPI&amp;nbsp; -c -o wrhist.o /glade/u/home/foster/tiegcm_ctmt/tiegcm_trunk/src/wrhist.F&lt;BR /&gt;mpif90 -o /glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys/tiegcm_trunk addfld.o addiag.o advance.o advec.o allocdata.o apex.o apex_subs.o aurora.o chapman.o chemrates.o cism_adhoc.o cism_coupling.o cism_intercomm.o colath.o comp.o comp_n2d.o comp_n4s.o comp_no.o comp_o2o.o cons.o cpktkm.o ctmt.o diags.o dispose.o divrg.o dt.o duv.o dynamics.o dynamo.o efield.o elden.o fft9.o fields.o filter.o getfile.o gpi.o gswm.o hdif.o heelis.o highlatpoten.o hist.o imf.o init.o inp_read.o input.o ionvel.o lamdas.o lbc.o lsqdsq.o magfield.o magpres_g.o minor.o mk_polelat.o mkhvols.o mpi.o mud.o mudcom.o mudmod.o muh2cr.o nchist.o newton.o numfiles.o oplus.o output.o params.o qinite.o qjion.o qjnno.o qjoule.o qrj.o rdsource.o saber_tidi.o settei.o smooth.o soldata.o sphpac.o swdot.o tgcm.o timing.o trsolv.o util.o vtsetup.o wei01gcm.o wei05sc.o wrhist.o -lcurl -L -lnetcdf&lt;BR /&gt;/ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__io_return':&lt;BR /&gt;for_diags_intel.c:(.text+0xa6c): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xbdb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xbeb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xc46): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;/ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__issue_diagnostic':&lt;BR /&gt;for_diags_intel.c:(.text+0xd66): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xdcb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x12b9): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x12e0): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x140e): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x1435): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x1537): additional relocation overflows omitted from the output&lt;BR /&gt;gmake[1]: *** [/glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys/tiegcm_trunk] Error 1&lt;BR /&gt;gmake[1]: Leaving directory `/glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys'&lt;BR /&gt;gmake: *** [Depends] Error 2&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2013 17:51:48 GMT</pubDate>
    <dc:creator>Ben_Foster</dc:creator>
    <dc:date>2013-03-29T17:51:48Z</dc:date>
    <item>
      <title>relocation truncated to fit</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985108#M100606</link>
      <description>&lt;P&gt;I am compiling f90 code with intel 12.1.5 on x86_64 x86_64 x86_64 GNU/Linux and am getting "relocation truncated to fit" errors in the link step, a few of which are copied below. I am using mpif90 with options -O3 -r8 -heap-arrays -mcmodel=medium -shared-intel. I am linking netcdf v4.2.&lt;/P&gt;
&lt;P&gt;As I understand it, this means I am using more than the 2GB limit of statically declared memory. If I execute "size *.o", then sum all numbers in the bss column, I get 94,447,960. I think this means almost 100MB, way&amp;nbsp; under 2 GB. Much of my memory is dynamically allocated from the heap. I doubt netcdf is statically allocated very much, but will try to confirm this. Can anyone help? Thanks,&lt;/P&gt;
&lt;P&gt;--Ben (&lt;A href="mailto:foster@ucar.edu"&gt;foster@ucar.edu&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;mpif90 -r8 -heap-arrays -mcmodel=medium -shared-intel -I. -I/glade/u/home/foster/tiegcm_ctmt/tiegcm_trunk/src -I -O3&amp;nbsp; -DLINUX&amp;nbsp; -DMPI&amp;nbsp; -c -o wrhist.o /glade/u/home/foster/tiegcm_ctmt/tiegcm_trunk/src/wrhist.F&lt;BR /&gt;mpif90 -o /glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys/tiegcm_trunk addfld.o addiag.o advance.o advec.o allocdata.o apex.o apex_subs.o aurora.o chapman.o chemrates.o cism_adhoc.o cism_coupling.o cism_intercomm.o colath.o comp.o comp_n2d.o comp_n4s.o comp_no.o comp_o2o.o cons.o cpktkm.o ctmt.o diags.o dispose.o divrg.o dt.o duv.o dynamics.o dynamo.o efield.o elden.o fft9.o fields.o filter.o getfile.o gpi.o gswm.o hdif.o heelis.o highlatpoten.o hist.o imf.o init.o inp_read.o input.o ionvel.o lamdas.o lbc.o lsqdsq.o magfield.o magpres_g.o minor.o mk_polelat.o mkhvols.o mpi.o mud.o mudcom.o mudmod.o muh2cr.o nchist.o newton.o numfiles.o oplus.o output.o params.o qinite.o qjion.o qjnno.o qjoule.o qrj.o rdsource.o saber_tidi.o settei.o smooth.o soldata.o sphpac.o swdot.o tgcm.o timing.o trsolv.o util.o vtsetup.o wei01gcm.o wei05sc.o wrhist.o -lcurl -L -lnetcdf&lt;BR /&gt;/ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__io_return':&lt;BR /&gt;for_diags_intel.c:(.text+0xa6c): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xbdb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xbeb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xc46): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;/ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o): In function `for__issue_diagnostic':&lt;BR /&gt;for_diags_intel.c:(.text+0xd66): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0xdcb): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x12b9): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x12e0): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x140e): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x1435): relocation truncated to fit: R_X86_64_PC32 against symbol `message_catalog' defined in COMMON section in /ncar/opt/intel/12.1.0.233/composer_xe_2011_sp1.11.339/compiler/lib/intel64/libifcore.a(for_diags_intel.o)&lt;BR /&gt;for_diags_intel.c:(.text+0x1537): additional relocation overflows omitted from the output&lt;BR /&gt;gmake[1]: *** [/glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys/tiegcm_trunk] Error 1&lt;BR /&gt;gmake[1]: Leaving directory `/glade/p/work/foster/tiegcm_ctmt/tiegcm_ctmt_dres-ys'&lt;BR /&gt;gmake: *** [Depends] Error 2&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 17:51:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985108#M100606</guid>
      <dc:creator>Ben_Foster</dc:creator>
      <dc:date>2013-03-29T17:51:48Z</dc:date>
    </item>
    <item>
      <title>This is just a guessed</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985109#M100607</link>
      <description>&lt;P&gt;This is just a guessed solution, but it is easy and harmless enough to try:&lt;/P&gt;
&lt;P&gt;To the linking command (the second command listed above), add the flag -mcmodel=medium.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 18:05:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985109#M100607</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-03-29T18:05:31Z</dc:date>
    </item>
    <item>
      <title>Thanks mecej4, it worked when</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985110#M100608</link>
      <description>&lt;P&gt;Thanks mecej4, it worked when I cut-and-pasted both -mcmodel and -shared-intel into the link command. But I don't understand how to do this from my Makefile. I tried adding -Wl,-mcmodel=medium,-shared-intel to FFLAGS, but it did not pass them to the linker, and I got the same relocations errors as before. Can you help? Thanks,&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 21:19:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985110#M100608</guid>
      <dc:creator>Ben_Foster</dc:creator>
      <dc:date>2013-03-29T21:19:25Z</dc:date>
    </item>
    <item>
      <title>Usually in a makefile FFLAGS</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985111#M100609</link>
      <description>&lt;P&gt;Usually in a makefile FFLAGS is used only for compiling, and LDFLAGS or some such variable is used for setting linker flags. However, other styles of makefiles are also common. What matters is that the correct flags be used for compiling as well as for linking.&lt;/P&gt;
&lt;P&gt;You may use the -n flag of the &lt;STRONG&gt;make&lt;/STRONG&gt; command to make a dry run in which you check that -mcmodel=medium is included in the linking command.&lt;/P&gt;
&lt;P&gt;Not having seen your makefile, I am able to say only that much.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 21:49:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985111#M100609</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-03-29T21:49:00Z</dc:date>
    </item>
    <item>
      <title>Ok, I've got it working now.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985112#M100610</link>
      <description>&lt;P&gt;Ok, I've got it working now. Thanks a lot for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 22:17:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/m-p/985112#M100610</guid>
      <dc:creator>Ben_Foster</dc:creator>
      <dc:date>2013-03-29T22:17:08Z</dc:date>
    </item>
  </channel>
</rss>

