Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
In article <PHIL.95Oct18150729@peace.med.ohio-state.edu> phil@peace.med.ohio-state.edu (Phil) writes: > I have a very larger byte array. Whenever I try to do anything with > it or create a new variable I get the ever present temporary resources > unavailable. > > Could someone offer some workarounds. Here's what I do. > > I read a file into a 4D array of a size like 93x181x42x31. I then > want to shift one of the bins like, i.e., > > openr,1,file > readu,1,a > close,1 > vol = byte(a,12,93,181,42,31) > vol = shift(vol,0,0,21,0) > ^^^^^^ > > It's after this that I get the error. I have tried to do the following: > vol = shift(temporary(vol),0,0,21,0) > > Now, not only do I get the error, but I lost the whole var as well. > > Any suggestions accepted. Well, vol is 21MB as a byte array and if a is a float or long integer it's using 84MB of memory. In addition, the shift operation will have to create another 21MB of memory to compute the result. Do you have > 120MB of free memory or virtual memory? > vol = byte(a,12,93,181,42,31) delvar,a > vol = shift(vol,0,0,21,0) will at least free up 21MB times the type of variable a is. That might give you enough space to accomplish your task. Dan (I speak for no organization) O'Connell geomagic@seismo.usbr.gov Seismotectonics Group, U.S. Bureau of Reclamation Denver Federal Center, P.O. Box 25007 D-8330, Denver, CO 80225 "We do custom earthquakes (for food)" or "Just more roadkill on the information superhighway" /\ / \ / \ /\ /\ /\ / \ / \ / \ /\ /\/\ /\/\ ___/ \ /\/\/\/ \ / \ /\ / \ / \/ \/ \ /\_______ \/ \ / \ / \/ \/ \/ \/ \/ FIAT: Oozing rust from every pore, it disintegrated across the floor... (Proud owner of auto-recyling FIAT)