[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with large array
From: |
CdeMills |
Subject: |
Re: Problem with large array |
Date: |
Tue, 20 Mar 2012 08:06:49 -0700 (PDT) |
George-2 wrote
>
>
> The final matrix should be approximately of size 34,000 x 2,387 or about
> 80,000,000 elements.
>
> Can you please answer a few questions?
>
> 1. How can I fix this error?
> 2. This process is very slow...taking about 6 hours (if it finished.) Is
> there a better way to do this?
>
>
- to fix the error: run your loop in reverse order, in such a way that the
big matrix is never resized. Or at least pre-compute the size, and
initialise it once. Indeed, in your case, the last step is about resizing a
big matrix which is close to its final size. So there will be two copies for
a small time. If you exhaust your memory at this time, it's game over.
- other suggestions: try to work by segments, in such a way you never have
all the data in memory at the same time
- do your data needs to be stored as double ? Maybe int8 or int16 would be
enough ?
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/Problem-with-large-array-tp4488957p4489124.html
Sent from the Octave - General mailing list archive at Nabble.com.