Re: intel-mac binary 32 or 64 bit?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 12 Oct 2009 12:21:44 -0600 (MDT)

Hi Jamie,

I don't know if this was ever resolved, but NCL is basically limited
to creating arrays whose dimension sizes can be represented by a C
signed integer (32-bit integer). This means that you can only allocate
up to (2^31)-1 bytes of total memory, regardless of how much memory
you have on your machine.

This is something that we are working on, and plan to bump up to
dimension sizes that can be represented by a 64-bit signed integer,
which amounts to a size of (2^63)-1 bytes.

The type of the NCL variable that you are creating also figures into
the size. For example, each integer or float value takes up 4 bytes,
so if you want to create a float or integer array, the largest one you
can create is ((2^31)-1)/4.

For a double array, this is further reduced to a size of ((2^31)-1)/8.

To play with this, see the attached "size.ncl" script. See what happens
if you set some sizes with:

   biggest_i = floattoint(2^31)-1 ; 2147483647
   big_i = biggest_i / 4 ; 536870911

and then try one of these two lines:

   f = new(big_i,float) ; This should work.

or:

   f = new(big_i+1,float) ; This would fail.

--Mary

On Fri, 2 Oct 2009, Jamie Scott wrote:

> Doesn't seem to be any limit to memory. Also "top" indicates I have 3.3GB
> available.
>
>> cputime unlimited
>> filesize unlimited
>> datasize 6144 kbytes
>> stacksize 8192 kbytes
>> coredumpsize 0 kbytes
>> memoryuse unlimited
>> descriptors 256
>> memorylocked unlimited
>> maxproc 266
>
>
> -Jamie
> On Oct 2, 2009, at 3:32 PM, Wei Huang wrote:
>
>> Jamie,
>>
>> Your Mac has 8G memory, does not mean your NCL can use all of them.
>> You may have other program running, such as your dock, web browser, finder,
>> etc.
>> For example, I have firefox running, which takes about 150M.
>>
>> Also, there may be per process limit on your mac, and you may
>> use "limit" command to see if there is a limit on each process.
>>
>> Thanks,
>>
>> Wei Huang
>> huangwei_at_ucar.edu
>> VETS/CISL
>> National Center for Atmospheric Research
>> P.O. Box 3000 (1850 Table Mesa Dr.)
>> Boulder, CO 80307-3000 USA
>> (303) 497-8924
>>
>>
>>
>>
>>
>> On Oct 2, 2009, at 3:10 PM, Jamie Scott wrote:
>>
>>> I'm running the latest ncl binary for the intel-mac (downloaded
>>> ncl_ncarg-5.1.1.MacOS_i386_9.7.0.tar from ESG),
>>> and I'm unable to allocate more than 3.5GB before getting a malloc error.
>>> I was allocating 200mb variables to see where
>>> the limit was.
>>>
>>>> ncl(46785) malloc: *** mmap(size=200003584) failed (error code=12)
>>>> *** error: can't allocate region
>>>> *** set a breakpoint in malloc_error_break to debug
>>>> fatal:NclMalloc Failed:[errno=12]
>>>> fatal:New: could not create new array:[errno=12]
>>>> br>
>>>
>>> So it appears this binary is 32-bit instead of 64. Is this the case or is
>>> there something else wrong? If so, is it possible to make a 64-bit
>>> binary?
>>>
>>> I'm using mac OS X 10.58 on and intel-mac with 8GB memory.
>>> Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
>>> root:xnu-1228.15.4~1/RELEASE_I386 i386 i386
>>>
>>>
>>> Thanks,
>>>
>>> Jamie Scott
>>> _______________________________________________
>>> 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 Mon Oct 12 2009 - 12:21:44 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 15 2009 - 09:30:48 MDT