Re: encountering memory problem using svd_lapack

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 30 2011 - 08:48:23 MST

Hi Kerrie,

Internally, when you call an NCL computation function, it usually has to convert your data to double precision first, because the Fortran routines all take double precision values.

This means if you are coming in with float values, then a copy has to be made of your data in order to convert it to double precision.

This error message is telling you that when it tried to do this, it ran out of memory.

There are a couple of things you can try to clean up your memory usage:

   - Delete any large arrays you still have that you don't need with the "delete" procedure:

         delete(array1)
         delete(array2
         delete(array3)
or
        delete([/array1,array2,array3/]) ; if you have NCL V6.0.0

You should do this as soon as possible after you don't need the arrays anymore.

   - When you read in the data that is the first argument to svd_lapack, convert it to double precision right away.
      This way, a separate copy won't have to be made internally when you call svd_lapack.

        A = todouble(f->A)

If this doesn't help, let me know. I think there might be a way to improve the memory usage in svd_lapack.

--Mary

On Nov 29, 2011, at 7:46 PM, Kerrie Geil wrote:

> Hi,
>
> Is there any way to get around the error below from svd_lapack other than to thin the data by using every other space point?
>
> The data I input into svd_lapack is time x space with these dimension sizes:
> Dimensions and sizes: [50] x [8838]
>
> ncl(87431) malloc: *** mmap(size=1916055552) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> fatal:svd_lapack: Unable to allocate memory for coercing output arrays to double precision
> fatal:Execute: Error occurred at or near line 179 in file stats_proj.ncl
>
> I'm working on a mac with the following settings from the limit command:
> cputime unlimited
> filesize unlimited
> datasize unlimited
> stacksize 16384 kbytes
> coredumpsize 0 kbytes
> memoryuse unlimited
> descriptors 2560
> memorylocked unlimited
> maxproc 266
>
>
> Thank you,
>
> --
> Kerrie Geil
>
> Master's Student
> Department of Atmospheric Sciences
> University of Arizona
> PAS Building Rm 526
> 1118 E 4th Street
> Tucson, AZ 85721
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 30 08:48:35 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST