Re: "segmentation fault"

From: Maurice McHugh <mmchug4_at_nyahnyahspammersnyahnyah>
Date: Fri, 10 Feb 2006 07:33:39 -0600

Hi filks,

It's embarrassing to admit, but I have produced segmentation faults
recently using NCL by trying to use "dim_median" on a variable that was
filled with "inf" values. It tooks me quite a while to debug as the
errors were apparently ramdomly occuring in a small section of code.
Long and painful story!

Maurice

janini_at_ucla.edu wrote:

> My machine is running x86_64 OS. The ncl is 64-bit. it has 8G of
> memory.
>
> Thanks,
> Janini
>
>>>
>>> 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
>>
>>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Feb 10 2006 - 06:33:39 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 10 2006 - 09:28:29 MST