<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Problem with modules]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=429</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=429&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Problem with modules.]]></description>
		<lastBuildDate>Wed, 28 Jan 2015 18:00:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problem with modules]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1852#p1852</link>
			<description><![CDATA[<p>Hi Jeff - I think I have discovered the problem with modules.&nbsp; My project is set up as follows:</p><p>C:\Projects\WinDAM B&nbsp; which contains the .prj, .exe and test dataset.&nbsp; There are three sub-folders - Build, Modules and Source.&nbsp; The Build and Modules folders are the used by Simply Fortran.&nbsp; Source contains all my source programs - modules, subroutines and main.&nbsp; I discovered that in the source folder, for each module, there was a corresponding .mod file that were not being removed by &quot;Clean&quot;.&nbsp; I deleted them and the program compiled and ran to conclusion.&nbsp; I checked after my last compile and source does not contain any .mod files.&nbsp; I think we can probably chalk this one up to operator error....<br />Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Wed, 28 Jan 2015 18:00:22 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1852#p1852</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem with modules]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1847#p1847</link>
			<description><![CDATA[<p>Here is the subroutine ElevGet.</p><p>&nbsp; &nbsp; !<br />! Subroutine ElevGet<br />!<br />!&nbsp; &nbsp; &nbsp; &nbsp; Routine to establish the elevation when a discontinuity occurs in the outflow discharges.<br />!<br />!<br />Subroutine ElevGet(Ell, Eul, Qo2, Vol, Qps, Qaux, Qot, Hc1, Ys, Xs, HdCutBase1, Wb1, X, &amp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Qb, Qbr, nMax, iusc, icr, Qumx, HydCtl)<br />!<br />Use A_AuxSpw_Mod<br />Use A_Embank_Mod<br />Use A_Struct_Mod<br />Use A_PSInfo_Mod<br />!<br />Implicit None<br />!<br />! Passed Variables<br />Integer(4), Intent(in) :: iusc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! the index in the Xs array indicating the position of <br />!&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;the upstream end of the crest<br />Integer(4), Intent(in) :: icr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! the index in the Xs/Ys arrays indicating the position <br />!&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;of the most downstream node having maximum elevation<br />Integer(4), Intent(in) :: nMax&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! the number of points in the Xs/Ys arrays</p><p>Real(8), Intent(inout) :: Ell&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Lower elevation bound<br />Real(8), Intent(inout) :: Eul&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Upper elevation bound<br />Real(8), Intent(inout) :: Qo2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Lower discharge bound<br />Real(8), Intent(out)&nbsp; &nbsp;:: Vol&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Associated volume<br />Real(8), Intent(out)&nbsp; &nbsp;:: Qps&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Outflow through the principal spillway<br />Real(8), Intent(out)&nbsp; &nbsp;:: Qaux(nSpWay) ! Outflow through the aux. spillway(s)<br />Real(8), Intent(out)&nbsp; &nbsp;:: Qot&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Total outflow, PS and AS(s)<br />Real(8), Intent(out)&nbsp; &nbsp;:: HydCtl&nbsp; &nbsp; &nbsp; &nbsp;! Hydraulic control elevation from QBreach Routine<br />Real(8), Intent(in)&nbsp; &nbsp; :: Hc1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! the elevation of the crest of the headcut for time step<br />Real(8), Intent(in)&nbsp; &nbsp; :: HdCutBase1&nbsp; &nbsp;! the elevation of the base of the headcut at time step<br />Real(8), Intent(in)&nbsp; &nbsp; :: Qumx&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! the maximum unit discharge from previous computations.<br />Real(8), Intent(in)&nbsp; &nbsp; :: X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! the position (Station) of the headcut at time step<br />Real(8), Intent(in)&nbsp; &nbsp; :: Xs(nMax)&nbsp; &nbsp; &nbsp;! X array describing dam cross section at low point<br />Real(8), Intent(in)&nbsp; &nbsp; :: Ys(nMax)&nbsp; &nbsp; &nbsp;! Y array describing dam cross section at low point<br />Real(8), Intent(in)&nbsp; &nbsp; :: Wb1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! <br />Real(8), Intent(in)&nbsp; &nbsp; :: Qb&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! Breach discharge<br />Real(8), Intent(in)&nbsp; &nbsp; :: Qbr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !<br />!<br />! External Function<br />Real(8), External&nbsp; &nbsp; &nbsp; :: Interp&nbsp; &nbsp;! Linear interpolation routine<br />! Local variables<br />Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Etry&nbsp; &nbsp; &nbsp;! Test elevation<br />Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Qcou<br />Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: QAS<br />Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Eh<br />!<br />Integer(4)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: ierr</p><br /><p>!Interval Halving Loop to Find Correct Elevation<br />If (Ell &gt; Eul) Then<br />&nbsp; &nbsp;Eh=Ell<br />&nbsp; &nbsp;Ell=Eul<br />&nbsp; &nbsp;Eul=Eh<br />End If<br />Do While ((Eul - Ell) &gt; 0.0001)<br />&nbsp; &nbsp; Etry = (Eul + Ell) / 2.</p><p>!&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Find Discharge Through Aux. Spw. for End of Time Step<br />!<br />&nbsp; &nbsp;Call TotalSpwFlow(Etry, Qps, Qaux, QAS, Qot, Qumx, Qb, Qbr, Qcou, Wb1, Hc1, &amp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;X, Xs, Ys, HdCutBase1, nMax, iusc, icr, ierr, HydCtl)</p><p>!&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Find Error in Mass Balance Equation<br />&nbsp; &nbsp; &nbsp;Vol = Interp(Etry, Expd%Elev, Expd%Volume, Expd%nStrPts)<br />!<br />&nbsp; &nbsp; &nbsp;If (Qcou &gt; Qo2) Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eul = Etry<br />&nbsp; &nbsp; &nbsp;Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Ell = Etry<br />&nbsp; &nbsp; &nbsp;End If<br />End Do<br />!<br />Qo2=Qcou<br />!<br />Return<br />!<br />End Subroutine ElevGet</p><br /><p>Yes, I tried cleaning and no, it didn&#039;t help.<br />Don</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Wed, 28 Jan 2015 01:19:14 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1847#p1847</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem with modules]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1846#p1846</link>
			<description><![CDATA[<p>Don,</p><p>Could you also post a portion of the routine or file that uses this module (ElevGet.f90)?&nbsp; Also, I&#039;m assuming you&#039;ve tried it already, but performing a Clean first doesn&#039;t fix the problem?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 28 Jan 2015 00:57:32 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1846#p1846</guid>
		</item>
		<item>
			<title><![CDATA[Problem with modules]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1845#p1845</link>
			<description><![CDATA[<p>Hi Jeff,<br />I have another one for you.</p><p>In trying to build my project, notice that A_Struct_Mod.f90 compiles without errors</p><br /><p>Compiling .\Source\A_PSInfo_Mod.f90<br />Compiling .\Source\A_Struct_Mod.f90<br />Compiling .\Source\AllBlank.f90<br />.<br />.<br />.</p><p>However, when it trys to compile ElevGet.f90, I get the error listed below:</p><p>.<br />.<br />.<br />Compiling .\Source\DNorm.f90<br />Compiling .\Source\ElevGet.f90<br />.\Source\ElevGet.f90:68.29:</p><p>&nbsp; &nbsp; &nbsp;Vol = Interp(Etry, Expd%Elev, Expd%Volume, Expd%nStrPts)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />Error: Symbol &#039;expd&#039; at (1) has no IMPLICIT type<br />Error(E42): Last command making (.\Build\ElevGet.o) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Failed *</p><br /><p>This is the module that contains the &quot;Type(Expanded) :: Expd&quot; statement:<br />&nbsp; &nbsp; !<br />!<br />Module A_Struct_Mod<br />!<br />! Module to establish allocatable arrays and their associated variables.<br />!<br />! Used with the Vegetative Overtopping Protection program.<br />!<br />! Written by Don Hazlewood, November 26, 2003<br />!<br />Implicit None<br />!<br />Type Reservoir<br />&nbsp; &nbsp; Real(8), Allocatable :: Elev(:)&nbsp; &nbsp; &nbsp; &nbsp; ! Structure Elevation Table<br />&nbsp; &nbsp; Real(8), Allocatable :: PSDisch(:)&nbsp; &nbsp; &nbsp;! Structure Prin. Spillway Discharge Table<br />&nbsp; &nbsp; Real(8), Allocatable :: Area(:)&nbsp; &nbsp; &nbsp; &nbsp; ! Structure Area in acres<br />&nbsp; &nbsp; Real(8), Allocatable :: Volume(:)&nbsp; &nbsp; &nbsp; ! Structure Volume in acre-feet<br />&nbsp; &nbsp; !<br />&nbsp; &nbsp; Integer(4) ::&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStrPts&nbsp; &nbsp; &nbsp; &nbsp; ! Number of points in the Revervoir table<br />&nbsp; &nbsp; !<br />&nbsp; &nbsp; Character(10) :: Str_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Structure Identifier<br />&nbsp; &nbsp; !<br />&nbsp; &nbsp; Real(8) :: StrInt&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! Structure rating table interval<br />End Type Reservoir<br />Type (Reservoir) :: Str<br />!<br />Type Expanded<br />&nbsp; &nbsp; Real(8), Allocatable&nbsp; :: Elev(:)&nbsp; &nbsp; &nbsp; &nbsp;! Expanded elevation table<br />&nbsp; &nbsp; Real(8), Allocatable&nbsp; :: PSDisch(:)&nbsp; &nbsp; ! Expanded PS discharge table<br />&nbsp; &nbsp; Real(8), Allocatable&nbsp; :: Area(:)&nbsp; &nbsp; &nbsp; &nbsp;! Expanded structure Area table<br />&nbsp; &nbsp; Real(8), Allocatable&nbsp; :: Volume(:)&nbsp; &nbsp; &nbsp;! Expanded structure volume table<br />&nbsp; &nbsp; !<br />&nbsp; &nbsp; Integer(4)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: nStrPts&nbsp; &nbsp; &nbsp; &nbsp;! Number of points in expanded structure tables<br />End Type Expanded<br />Type (Expanded) :: Expd<br />!<br />Real(8)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: StrZero&nbsp; &nbsp; &nbsp; &nbsp;! Elevation of zero reservoir storage<br />!<br />Logical(1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: VolGiven&nbsp; &nbsp; &nbsp; ! True-volume given; False-not given<br />Logical(1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: AreaGiven&nbsp; &nbsp; &nbsp;! True-area given; False-not given<br />Logical(1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: ElevChange&nbsp; &nbsp; ! True-elevation changed more than 0.01&#039;; False-no<br />Logical(1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Breached&nbsp; &nbsp; &nbsp; ! Switch to indicate stress greater than 100%</p><p>!<br />End Module A_Struct_Mod</p><br /><p>I have tried everything I can think of to get around this problem, but no luck. It has worked in the past, but after I changed Exp (which was the Type (Expanded) name originally) to avoid confusion with the EXP function, I started getting this error.&nbsp; It&#039;s almost like it isn&#039;t deleting the old compiled module.</p><p>This happen with 2.19 and 2.20 builds.&nbsp; Any suggestions?</p>]]></description>
			<author><![CDATA[null@example.com (Don Hazlewood)]]></author>
			<pubDate>Tue, 27 Jan 2015 23:14:06 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1845#p1845</guid>
		</item>
	</channel>
</rss>
