Re: large arrays and transpose [message #31347] |
Mon, 01 July 2002 13:25 |
wmconnolley
Messages: 106 Registered: November 2000
|
Senior Member |
|
|
Sean Raffuse <sean@me.wustl.edu> wrote:
> Problem is that the array is too large, and I am "unable to allocate memory
> to make array."
Some systems (like our alphas) impose articifial memory limits
on processes. Try:
limit datasize unlimited
(or it may be ulimit, or whatever) and see if that helps. In fact, try
limit
first just to see what your limits are. What system are you on?
-W.
--
William M Connolley | wmc@bas.ac.uk | http://www.nerc-bas.ac.uk/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
|
|
|
Re: large arrays and transpose [message #31348 is a reply to message #31347] |
Mon, 01 July 2002 11:51  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
"Sean Raffuse" <sean@me.wustl.edu> writes:
> Hello.
>
> I have an array like so:
>
> output = intarr(100, 3600,1800)
>
> At the end of my program, I would like to do this:
> output = TRANSPOSE(output, [1, 2, 0])
>
> Problem is that the array is too large, and I am "unable to allocate memory
> to make array."
Sean, if you really cannot fit two copies of the same array in memory,
then you are probably going to run into more problems than simply the
TRANSPOSE step.
My first question: do you really need to transpose? Or, can you keep
it in the same format and simply access it differently.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: large arrays and transpose [message #31349 is a reply to message #31348] |
Mon, 01 July 2002 08:18  |
Don J Lindler
Messages: 19 Registered: April 2001
|
Junior Member |
|
|
>
> I have an array like so:
>
> output = intarr(100, 3600,1800)
>
> At the end of my program, I would like to do this:
> output = TRANSPOSE(output, [1, 2, 0])
>
> Problem is that the array is too large, and I am "unable to allocate
memory
> to make array."
>
You might try something like this:
openw,1,'temp'
for i=0,99 do writeu,1,output(i,*,*)
close,1
output = reform(output,3600,1800,100,/overwrite) ;reuse same memory
openr,1,'temp'
readu,1,output
close,1
Assumming output fits in memory, this should not be too bad. If you do not
have
enough memory, you will get alot of swapping during the write.
Don Lindler
|
|
|