Re: "segmentation fault"

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 8 Feb 2006 17:17:59 -0700 (MST)

>
>On Wed, Feb 08, 2006 at 03:50:37PM -0800, janini_at_ucla.edu wrote:
>> Hi,
>>
>> I'm trying to create a new 4D array just like that:
>>
>> VAR0=new((/150,40,387,320/),"float")
>>
>> and I'm getting a "segmentation fault" error.
>>
>> If it's not the limit.....What can I do to get past this error?
>
>Are you running 64-bit NCL? How much memory do you have?
>

Kate's response hits the nail on the head!

 150*40*387*320 = 743,040,000 values
 
 Each value is 4 bytes [float]
 
 4*743040000 ==> 2,972,160,000 bytes ==> 2.97 giga bytes
 
A 32-bit system can address 'only' up to 2GB.

A 64-bit system could readily handle a 2+Gb address.
However, some 64-bit systems may restrict the underlying
C-malloc to use 32-bit addressing only.

---
Also, say you have 4GB of memory and limited swap
space [disk]. If you try to use say 5 variables
of 1GB space your script will fail if your swap 
space is not large enough.
Regards
D
 
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 08 2006 - 17:17:59 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 09 2006 - 09:29:11 MST