<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Allocation would exceed memory limit PROBLEM]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=459&amp;type=atom" />
	<updated>2015-05-08T12:04:12Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=459</id>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2058#p2058" />
			<content type="html"><![CDATA[<p>Good to hear that everything is working!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-05-08T12:04:12Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2058#p2058</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2054#p2054" />
			<content type="html"><![CDATA[<p>It was a bug with the length of one vector. The program now runs fine with very large matrices. And its very fast.<br />Thanks!!!</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-05-06T21:30:36Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2054#p2054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2049#p2049" />
			<content type="html"><![CDATA[<p>I think I&#039;ll just run debugger.... for the first time.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-05-01T19:22:50Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2049#p2049</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2048#p2048" />
			<content type="html"><![CDATA[<p>The same thing happened. The program reported the same error during the setup of the matrix elements.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-05-01T18:01:35Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2048#p2048</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2047#p2047" />
			<content type="html"><![CDATA[<p>Jeff, </p><p>I&#039;ve tried :<br />ALLOCATE(Hamiltonian(18000:18000))<br />Hamiltonian= CMPLX(0.0, 0.0)</p><p>And the program successfully passes the line where I am enforcing all the elements to (complex) zero. It was very quick, just a minute or two.<br />Now, there is slow part where several complicated functions are setting up the actual values of &quot;Hamiltonian.&quot; This takes five hours or longer. This is the place where the program breaks down for large matrices.<br />Will keep you posted.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-05-01T16:34:42Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2047#p2047</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2046#p2046" />
			<content type="html"><![CDATA[<p>Thanks Jeff!&nbsp; I&#039;ll try that and will post results here. </p><p>At the end of each iteration (simply, it&#039;s one for-loop) I use DEALLOCATE explicitly for all ALLOCATABLE matrices/vectors.&nbsp; In this (test) case I was running just one iteration and the program breaks down after the big matrix is successfully allocated and during setup (calculation) of the matrix elements.&nbsp; The program never reached the part where LAPACK calculates eigenvalues of this big matrix. </p><p>In the meantime, here is some more error info that I got when running the program using command line.<br />==================================================<br />Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br />Backtrace for this error:<br />job aborted:<br />[ranks] message<br />[0] process exited without calling finalize<br />[1-31] terminated<br />---- error analysis ----<br />[0] on MSW10<br />target.exe ended prematurely and may have crashed. exit code 3.<br />---- error analysis ----<br />===================================================</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-05-01T16:19:31Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2046#p2046</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2045#p2045" />
			<content type="html"><![CDATA[<p>Boris,</p><p>The flags:</p><div class="codebox"><pre><code>-mcmodel=medium</code></pre></div><p>should definitely provide enough allocation space on the heap.&nbsp; I would suggest that you try immediately initializing all memory associated with an array in an attempt to force the memory manager to access the entire block.&nbsp; Something simple like:</p><div class="codebox"><pre><code>ALLOCATE(bigdata(21000:21000))
bigdata = 0.0</code></pre></div><p>The above might help the situation.</p><p>Do you explicitly deallocate the arrays when you&#039;ve finished with them?</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-05-01T12:11:18Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2045#p2045</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2044#p2044" />
			<content type="html"><![CDATA[<p>Here is one interesting information.</p><p>- The ALLOCATION of the large (18k by 18k) matrix went well. <br />- However, during the SETUP (CALCULATION) of the matrix elements of the large matrix the execution stopped with the error message:<br />================================================= <br />Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br />Backtrace for this error:<br />=================================================<br />No other output info.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-30T23:55:27Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2044#p2044</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2043#p2043" />
			<content type="html"><![CDATA[<p>It didn&#039;t work with:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -mcmodel=large</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-30T23:13:20Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2043#p2043</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2042#p2042" />
			<content type="html"><![CDATA[<p>I&#039;ll&nbsp; try -mcmodel=large.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-30T20:58:23Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2042#p2042</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2041#p2041" />
			<content type="html"><![CDATA[<p>Compiling my code as 64-bit project helped, and I was able to process matrices up to size 14,000 (2.92GB). </p><p>Using flags “-mcmodel=medium” in the two edit boxes (FORTRAN COMPILER and LINKER) didn’t help to go beyond 14,000 size (I nee to process matrices of around 22,0000 in size).</p><p>I still get the same error for matrices larger than 14,000. All the matrices I use vary in size over the iterations in a for-loop, so all of them are ALLOCATABLE. </p><p>If you have more advices, I would greatly appreciate. I’ll keep on looking for the problem and will post my findings here. Thanks once again!</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-30T19:43:59Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2041#p2041</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2034#p2034" />
			<content type="html"><![CDATA[<p>Thank you both. Let me see what can I do with your advises and I&#039;ll report back how it went.<br />b</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-27T15:48:36Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2034#p2034</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2028#p2028" />
			<content type="html"><![CDATA[<p>Boris,</p><p>There are two things to check when allocating such large amounts of RAM.&nbsp; First, make sure your project is configured as a 64-bit executable.&nbsp; A 32-bit executable probably won&#039;t be able to allocate a full 2GB, even on 64-bit Windows, due to Windows limits.</p><p>Second, under compiler flags under both &quot;Fortran&quot; and &quot;Linker,&quot; add the following flag:</p><div class="codebox"><pre><code>-mcmodel=medium</code></pre></div><p>The above flag allows large allocations in your code.&nbsp; It should allow for 2GB of static allocation and basically unlimited dynamic allocation.&nbsp; </p><p>Make sure, though, that you are using Fortran&#039;s <em>ALLOCATE</em> calls.&nbsp; The static 2GB limit is a hard limit that cannot be increased (at least in this version of our included compiler).</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-04-26T15:36:16Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2028#p2028</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2026#p2026" />
			<content type="html"><![CDATA[<p>My advice would be to avoid such large arrays if possible.</p><p>However, if you really need a 11000 X 11000 array you could try just creating it in static memory.</p><p>Something like,</p><p>DOUBLE PRECISION, SAVE, DIMENSION(11000,11000) :: A</p><p>or the old-fashioned F77 way</p><p>DOUBLE PRECISION A(11000,11000)<br />SAVE A</p>]]></content>
			<author>
				<name><![CDATA[davidb]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3463</uri>
			</author>
			<updated>2015-04-25T08:19:14Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2026#p2026</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Allocation would exceed memory limit PROBLEM]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=2025#p2025" />
			<content type="html"><![CDATA[<p>Hi there,</p><p>I get following error message:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Operating system error: Not enough space<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Allocation would exceed memory limit</p><p>when I want to allocate in RAM complex double precision matrix size of 11,000 or larger. Such matrix takes approximately 2*8*(11000)^2/1024^3 = 1.8GB of RAM and I have 98 GB RAM available. In the performance monitor I can see that I am not taking&nbsp; more than 6GB our of the 98GB RAM at any time. </p><p>Please advise. <br />Thanks.</p>]]></content>
			<author>
				<name><![CDATA[Boris_MV]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3595</uri>
			</author>
			<updated>2015-04-25T00:10:55Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=2025#p2025</id>
		</entry>
</feed>
