[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
R: help on Octave
From: |
Pierpaolo |
Subject: |
R: help on Octave |
Date: |
Tue, 26 Jun 2012 16:13:30 +0200 |
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
-----Messaggio originale-----
Da: Martin Helm [mailto:address@hidden
Inviato: martedì 26 giugno 2012 15:56
A: Jordi Gutiérrez Hermoso
Cc: address@hidden; Pierpaolo
Oggetto: Re: help on Octave
Am 26.06.2012 15:52, schrieb Jordi Gutiérrez Hermoso:
> Oops, I made the wrong computation. I blame memroy fragmentation now.
> - Jordi G. H.
;) happened to me often enough (wrong calculations)
I have some doubts, even if memory is fragmented it will just allocate
that memory in the windows paging file.
@Pierpaolo:
Can you show us a short code snippet which leads to that problem?
Does something as simple as
a = rand(6200)
show the same problem?
- help on Octave, Pierpaolo, 2012/06/26
- Re: help on Octave, Jordi Gutiérrez Hermoso, 2012/06/26
- Re: help on Octave, Martin Helm, 2012/06/26
- Re: help on Octave, Jordi Gutiérrez Hermoso, 2012/06/26
- Re: help on Octave, Martin Helm, 2012/06/26
- R: help on Octave,
Pierpaolo <=
- Re: R: help on Octave, Martin Helm, 2012/06/26
- Re: R: help on Octave, Martin Helm, 2012/06/26
- Re: R: help on Octave, Jordi Gutiérrez Hermoso, 2012/06/26
- Re: R: help on Octave, Martin Helm, 2012/06/27
- Re: help on Octave, Michael Goffioul, 2012/06/27
- R: help on Octave, Pierpaolo, 2012/06/27
- Re: R: help on Octave, Martin Helm, 2012/06/27
- R: R: help on Octave, Pierpaolo, 2012/06/29
- Re: R: R: help on Octave, c., 2012/06/29
- Re: R: R: help on Octave, c., 2012/06/29