help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help on Octave


From: Michael Goffioul
Subject: Re: help on Octave
Date: Wed, 27 Jun 2012 14:05:00 +0100

On Tue, Jun 26, 2012 at 3:13 PM, Pierpaolo <address@hidden> wrote:
Sure...

A small part of code is:

#####################################
dimxtot = 49;  #numero nodi in x*)
dimytot = 49; #numero nodi in y*)
dy = 1/(dimytot - 1);   #rpasso in y*)
dd = dimxtot*dimytot; #scrittura sintetica*)
r = dx/dy;  #rapporto fra i passi*)
cicli=10;
t0 = clock ();
w=zeros(3*dimxtot*dimytot,3*dimxtot*dimytot);

for j = 3:(dimytot-1 -1)
       for i = 3:(dimxtot-1 -1)
  w((j-1)*dimxtot+(i),(j-1)*dimxtot+(i)) = 6 + 6*r^4 + 8*(r^2);
  w((j-1)*dimxtot+(i),(j-1)*dimxtot+(i-2))= 1;
  w((j-1)*dimxtot+(i),(j-1)*dimxtot+(i-1))=-4-4*(r^2);
  w((j-1)*dimxtot+(i),(j-1)*dimxtot+(i+1))=-4-4*(r^2);
  w((j-1)*dimxtot+(i),(j-1)*dimxtot+(i+2))=1;
  w((j-1)*dimxtot+(i),(j-1-1)*dimxtot+(i-1))=2*r^2;
  w((j-1)*dimxtot+(i),(j-1-1)*dimxtot+(i))=-4*r^4 -4*r^2;
  w((j-1)*dimxtot+(i),(j-1-1)*dimxtot+(i+1))=2*r^2;
  w((j-1)*dimxtot+(i),(j-1+1)*dimxtot+(i-1))=2*r^2;
  w((j-1)*dimxtot+(i),(j-1+1)*dimxtot+(i))=-4*r^4-4*r^2;
  w((j-1)*dimxtot+(i),(j-1+1)*dimxtot+(i+1))=2*(r^2);
  w((j-1)*dimxtot+(i),(j-1-2)*dimxtot+(i))=1*(r^4);
  w((j-1)*dimxtot+(i),(j-1+2)*dimxtot+(i))=1*(r^4);
       endfor
endfor
###################################

With 3*dimxtot*dimytot about 6200 I've memory error.

a=rand(6200) does not give any error
a=rand(8700) generates memory error

For the record, I could run "rand(8700)" (~600MB) without any crash on a WinXP system with 500MB RAM and 750MB page file, although a bit slow due to paging (this is with octave 3.6.2/VS2010).

So there may be some problems with your setup. What version of octave are you using and for which compiler? Is it possible the allocatable memory for the octave process is somehow capped?

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]