<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — 64-bit and 32-bit prob. solved]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=299&amp;type=atom" />
	<updated>2014-01-06T22:31:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=299</id>
		<entry>
			<title type="html"><![CDATA[Re: 64-bit and 32-bit prob. solved]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1211#p1211" />
			<content type="html"><![CDATA[<p>I have solved it. Very strange, nonetheless!</p><p>My main exécutable project had a statement,<br />UDat = DateToday()</p><p>It has this statement in the both the MAIN program, and then again in one subroutine<br />Both of these variables should be declared as CHARACTER*9</p><p>In the MAIN program, one of these two declarations is in a separately compiled MODULE. The other is declared explicitly at the start.&nbsp; In the subroutine there was neither the necessary MODULE statement nor the necessary declaration.</p><p>This caused the 32 bit prog to die at runtime.&nbsp; &nbsp;<br />What is hard to understand is why the 64 bit version, with the very same source files, didn&#039;t mind the error!</p><p>Jeff commented that It sounds like things shouldn&#039;t have even compiled if the subroutine didn&#039;t have UDat declared explicitly, although, if you don&#039;t declare it and don&#039;t include an &quot;implicit none&quot; statement, the compiler will assume it is a real.</p><p>My final thought: There must be something about how GFortran works, which enabled the 64-bit version somehow to find the same address for the same variables it had used before, when it entered my subroutine with the missing declarations.</p><p>Jeff advised me always to use explicit typing in future!<br />---<br />John</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-01-06T22:31:20Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1211#p1211</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[64-bit and 32-bit prob. solved]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1210#p1210" />
			<content type="html"><![CDATA[<p>I&#039;ve been using 64-bit for my project for a couple of months but, after converting to 32-bit, I&#039;m getting good compilation but runtime memory conflict error/failure.&nbsp; &nbsp;I have tried, and I believe I have managed, to copy into my 32 bit projects the exact equivalent settings to those I am using successfully in my 64-bit version.</p><p>The source files&nbsp; are the very same files, in both versions.<br />Here&#039;s what happens.</p><p>64-bit<br />Compiles OK.<br />Runs OK</p><p>32-bit<br />Compiles OK<br />Runs, but fails as soon as I try to open a file with it.<br />When it runs, it brings up my splash screen perfectly well but, the very moment I pull down the file menu (in my program) to open a data file, it crashes.</p><p>This is the error:</p><p>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br />Backtrace for this error: #0&nbsp; ffffffff</p><p>One thing I&#039;ve noticed (probably not relevant) is that the Compiler option to set the target CPU is a fixed setting which does not follow the project.&nbsp; &nbsp;I have been compiling for my 32-bit library and executable using &#039;generic&#039; and for the 64-bit lib and exec using &#039;amd64&#039;.&nbsp; </p><p>I strongly suspect that Jeff will be able to see straight away what I&#039;m doing wrong, so I&#039;ve sent him some relevant .prj files, makefiles and executables, plus a sample data file.&nbsp; I&#039;ll report here if I learn anything new that might be helpful to others.<br />--- <br />John</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-01-06T17:39:02Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1210#p1210</id>
		</entry>
</feed>
