Re: Segmentation Fault problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 17 2009 - 16:56:55 MST

Hi Eddy,

Are you getting any other error messages other than "seg fault"? It's
possible you are simply running out of memory, and hence when you do
the "delete", it works.

If you have V5.1.0 or later, then you shouldn't need to use
addfiles_GetVar anymore, as it has been deprecated.

Instead, you can use "addfiles" with the special "[:]" syntax. For
example:

var = f[:]->$vname$(:,:,:,0,:,0)*10.0

This way, you avoid an extra copy ov "vart".

--Mary

On Dec 17, 2009, at 3:36 PM, eddycarl wrote:

> Hi there,
>
> I am using NCL to read a couple of satellite data files (HDF
> format) and to write into NETCDF format.The original data is
> monthly and has a dimension of 360x720x9x4x6. I read 48 files, and
> store them as vart(48,360,720,9,4,6). Till now, the reading process
> is OK. When I try to get a segment of "vart" (i.e. var = vart(:,:,:,
> 0,:,0)), I got a "Segmentation fault (core dumped)". But, if I
> delete this line (i.e. var = vart(:,:,:,0,:,0)), the script can go
> on. Does someone know why is that? Thanks!
> P.S. My platform is 64-bit Linux, with 32GB memory.
> Part of my ncl script is as follow:
> =====================================
> ......
> vname = "data_name"
> ;;;; Read the varialbe ;;;;
> ;;;; switch to "join" mode ;;;;
> ListSetType (f, "join")
> vart = addfiles_GetVar (f, fils, vname) ; fils is a string
> array with filenames
> ; printVarSummary(vart) ; The information of vart can be
> printed successfully.
> var = vart(:,:,:,0,:,0) * 10.0 ; If this line is removed,
> the script can go on ...
> printVarSummary(var) ; Information about var is NOT printed.
> ......
> =====================================
>
> Best,
> -Eddy
>
>
>
> _______________________________________________
> 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 Thu Dec 17 16:57:16 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 17 2009 - 17:15:52 MST