<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Apparent Allocation error]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=481</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=481&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Apparent Allocation error.]]></description>
		<lastBuildDate>Tue, 28 Jul 2015 20:24:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2159#p2159</link>
			<description><![CDATA[<p>Jeff,<br />Apparently there can only be one allocated array within a structure. The array Hout%HydCtl() is also being corrupted and gets set to the same value that is assigned to Hout%Hyd(?)&nbsp; Hope this helps.<br />Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Tue, 28 Jul 2015 20:24:02 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2159#p2159</guid>
		</item>
		<item>
			<title><![CDATA[Re: Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2156#p2156</link>
			<description><![CDATA[<p>Hi Jeff.<br />I tried changing the structure, ie, separating the Hyd and Elev statements so they aren&#039;t adjacent, but that didn&#039;t help.&nbsp; I&#039;ve been programming for over 50 years and I&#039;ve never run into something like this.&nbsp; </p><p>One other thing I need to check that I just thought of.&nbsp; I need to check HydCtl to see if it gets corrupted also.&nbsp; Will let you know.</p><p>Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Mon, 27 Jul 2015 23:43:52 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2156#p2156</guid>
		</item>
		<item>
			<title><![CDATA[Re: Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2153#p2153</link>
			<description><![CDATA[<p>Don,</p><p>I&#039;ll have to research this behavior a bit.&nbsp; At first glance, I don&#039;t see an issue, of course.&nbsp; I&#039;ll see if I can reproduce the behavior.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Sun, 26 Jul 2015 22:24:02 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2153#p2153</guid>
		</item>
		<item>
			<title><![CDATA[Re: Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2152#p2152</link>
			<description><![CDATA[<p>Hi Jeff.&nbsp; Found a work around.&nbsp; If I remove Elev from the Hout structure and make it a stand-alone array, the problem goes away.&nbsp; As I say, it&#039;s a work-around, not a solution.&nbsp; Here is the entire Hout structure:</p><p>Type Hydro_Out<br />&nbsp; &nbsp; Real(8), Allocatable :: Hyd(:)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Outflow Hydrograph<br />!&nbsp; &nbsp;Real(8), Allocatable :: Elev(:)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Outflow elevations at discharges<br />&nbsp; &nbsp; Real(8), Allocatable :: HydCtl(:)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Hydraulic Control computed in QBreach<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: DeltaT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Time increment of hydrograph<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: StartTime&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Starting time of first non-zero hydrograph value<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: PeakQ&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Peak of the outflow hydrograph<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: TimeQ&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Time of peak, outflow hydrograph<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Duration&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Duration of flow, outflow hydrograph<br />&nbsp; &nbsp; Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: StorVol&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Storage volume, ac. ft. of outflow hydrograph<br />&nbsp; &nbsp; Integer(4)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: nHydPts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Number of points in the outflow hydrograph<br />&nbsp; &nbsp; Integer(4)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: nPeak&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Hydrograph pointer to peak<br />&nbsp; &nbsp; Character(10)&nbsp; &nbsp; &nbsp; &nbsp; :: HydID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Hydrograph Identifier<br />End Type Hydro_Out<br />Type (Hydro_Out)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: Hout<br />Real(8), Allocatable&nbsp; &nbsp; &nbsp;:: ElevOut(:)&nbsp; &nbsp; &nbsp; &nbsp; ! Outflow elevations at discharges</p><p>Notice that Elev is commented out and ElevOut is its replacement.</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Sun, 26 Jul 2015 16:50:38 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2152#p2152</guid>
		</item>
		<item>
			<title><![CDATA[Re: Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2151#p2151</link>
			<description><![CDATA[<p>More info.&nbsp; I had an associate compile the program using the old Compaq Fortran and we get the same results.&nbsp; So it appears to be something in the code that&#039;s causing the problem.&nbsp; Is it possible that some type of optimization is the culprit?</p><p>Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Sat, 25 Jul 2015 15:13:21 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2151#p2151</guid>
		</item>
		<item>
			<title><![CDATA[Apparent Allocation error]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2148#p2148</link>
			<description><![CDATA[<p>Jeff, I have found a problem that has me completely stumped.&nbsp; Following is a code snippet starting at line 783 in WinDam.f90:</p><p>&nbsp; &nbsp; ! set initial input<br />&nbsp; &nbsp; Qin1 = Hin%Hyd(1)<br />&nbsp; &nbsp; ! initialize time integral values and stored values<br />&nbsp; &nbsp; Hout%Hyd(1) = Qout1<br />&nbsp; &nbsp; EmbIntgrl(1) = 0.<br />&nbsp; &nbsp; Time = T1<br />&nbsp; &nbsp; Hout%Elev(1) = Elev1<br />&nbsp; &nbsp; EmbTime(1) = Time</p><p>Qout1 has a value of 4821.&nbsp; When Hout%Hyd(1) is set to Qout1, Hout%Elev(1) is also set to the same value and the assignment Hout%Elev(1) = Elev1 never happens.&nbsp; It&#039;s as if Hout%Hyd and Hout%Elev are allocated to the same space. </p><p>I can send you the entire program and dataset that&#039;s causing the problem if you want.&nbsp; The program consists of a mainline (WinDAM.f90) and approximately 60 modules and subroutines.&nbsp; Just tell me your email and I&#039;ll send it to you.</p><p>Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Fri, 24 Jul 2015 21:38:56 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2148#p2148</guid>
		</item>
	</channel>
</rss>
