[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: temporary() pitfall
Jaco van Gorkom wrote:
>
> Thanks, Wayne. I gained some new insights here.
>
> > The memory that you save with TEMPORARY() comes at the cost of losing
> > the original array contents. If you are worried about losing the
> > result of a long computation because of hitting a memory limit, then I
> > would SAVE the array to disk first. (I find that programs that use a
> > lot of TEMPORARY calls are also difficult to debug.)
>
> I agree that losing the original contents is the price that I was
> willing to pay. I guess I was just hoping that someone here would come
> up with another secret and magical keyword to ROUTINE_NAMES(), to
> recover that which seems lost forever. Always keep hoping for a
> miracle...
>
> SAVEing to disk is of course the best option,
Hmm, why not re-design the code to work in a smaller memory footprint? (E.g. using smarter, memory
efficient algorithms for doing linear algebra based on the type of matrix; sparse, banded, dense,
etc.) The up front cost will be high (wrt time at least), but at least you'll know the code has a
better chance of working when your dataset/data flow increases 100-fold.
jsut me musing and mucking about.
paulv
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.207, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746