<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?action=history&amp;feed=atom&amp;title=%22relocation_truncated_to_fit%22_compilation_error</id>
		<title>&quot;relocation truncated to fit&quot; compilation error - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?action=history&amp;feed=atom&amp;title=%22relocation_truncated_to_fit%22_compilation_error"/>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=%22relocation_truncated_to_fit%22_compilation_error&amp;action=history"/>
		<updated>2026-07-07T02:05:06Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=%22relocation_truncated_to_fit%22_compilation_error&amp;diff=1548&amp;oldid=prev</id>
		<title>Emillour: Created page with &quot;== The symptoms == If when you compile the PCM you get an error message of the likes of  &lt;pre&gt; ... relocation truncated to fit: R_X86_64_PC32 against symbol ... &lt;/pre&gt; while c...&quot;</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=%22relocation_truncated_to_fit%22_compilation_error&amp;diff=1548&amp;oldid=prev"/>
				<updated>2023-07-06T16:11:45Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== The symptoms == If when you compile the PCM you get an error message of the likes of  &amp;lt;pre&amp;gt; ... relocation truncated to fit: R_X86_64_PC32 against symbol ... &amp;lt;/pre&amp;gt; while c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== The symptoms ==&lt;br /&gt;
If when you compile the PCM you get an error message of the likes of &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
... relocation truncated to fit: R_X86_64_PC32 against symbol ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
while compiling the lon-lat PCM with a large grid (e.g. 360x180x...), this is because all the static arrays defined in the code are so large that in the end indexing from one location of the executable to another can no longer be supported by integers, which is the default way to proceed.&lt;br /&gt;
&lt;br /&gt;
== The cure ==&lt;br /&gt;
With adequate compiling and linking options this can be solved. In practice with the gfortran compiler you 'll need to add&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
-mcmodel=medium&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And with the ifort compiler&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
-mcmodel=large -shared-intel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
will do the trick.&lt;br /&gt;
&lt;br /&gt;
== The gory details ==&lt;br /&gt;
This page https://stackoverflow.com/questions/12916176/gfortran-for-dummies-what-does-mcmodel-medium-do-exactly#12957457 actually sum it all nicely&lt;br /&gt;
&lt;br /&gt;
[[Category:Errors]]&lt;br /&gt;
[[Category:Generic-Model]]&lt;br /&gt;
[[Category:Mars-Model]]&lt;br /&gt;
[[Category:Venus-Model]]&lt;br /&gt;
[[Category:Titan-Model]]&lt;/div&gt;</summary>
		<author><name>Emillour</name></author>	</entry>

	</feed>