Re: Segmentation fault (core dumped)

From: Vishali P. <vishali.prat_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 20 2011 - 09:45:00 MDT

Hi.

When I tried to run normally, it only appeared : ' Segmentation fault (core
dumped)'

When I've tried to run with Mary's command ncl -x CalculateSeasonalMeans.ncl
:

Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+
+
+ yrStrt = 1998
+ yrLast = 2004
+ nyrs = yrLast-yrStrt+1
+ klev = 17
+ nlat = 73
+ mlon = 144
+ ntim = 12*nyrs ; number of months
+
+ wMon = new ( (/ntim,klev,nlat,mlon/), "float", 1e20)
+ tMon = new ( ntim, "double", "No_FillValue")
+
+
+ diru = "/home/Vishali/Documents/dadosVentos/SpeedTest/"
+ filu = systemfunc("cd "+diru+" ; ls wind*nc")
+ nfilu = dimsizes(filu)
+
+ ; calculate monthly means from 6hrly
+ nmoStrt = 0
+ nmoLast = 11
+ do nf=0,nfilu-1
+
+ f = addfile(diru+filu(nf), "r")
+ w = f->WSpeed
+ wMon(nmoStrt:nmoLast,:,:,:) = calculate_monthly_values(w, "avg",0,
False)
+ nmoStrt = nmoStrt+12
+ nmoLast = nmoLast+12
+ delete(w) ; may change size next iteration (leap yr)
+ end do
Segmentation fault (core dumped)

On Mon, Jun 20, 2011 at 3:16 PM, Mary Haley <haley@ucar.edu> wrote:

>
> On Jun 20, 2011, at 2:40 AM, Vishali P. wrote:
>
> > Dear NCL users
> >
> > I'm using 4x Daily NCEP/DOE AMIP-II Reanalysis wind data 1998 to 2004.
> I've calculated wind speed for each year...and created outputs.
> > I was suggested a script to calculate unweighted seasonal means. And
> then, average of each season from 1998 to 2004, ie, average if season 1 from
> 1998 to 2004,average of season 2 from 1998 to 2004, then 3rd and 4th.
> >
> > But when I try to run,appears error "Segmentation fault (core dumped)".
> > Can anyone help me ?
> > Current version of my NCL is 5.2.1.
> >
> >
> > Thank you in advance
> >
> > Vishali
>
> Hi Vishali,
>
> It could be a memory issue, but I don't have enough information to
> determine this.
>
> Do you know where the code is seg faulting? To get this information, run
> ncl with the -x option, which causes every line to be executed as it is run:
>
> ncl -x your_script.ncl
>
> It would help if you could include all the output from running this
> command, plus all the output from your various printVarSummary statements.
>
> Thanks,
>
> --Mary
>
> >
> >
> =========================================================================================
> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> >
> > yrStrt = 1998
> > yrLast = 2004
> > nyrs = yrLast-yrStrt+1
> > klev = 17
> > nlat = 73
> > mlon = 144
> > ntim = 12*nyrs ; number of months
> >
> > wMon = new ( (/ntim,klev,nlat,mlon/), "float", 1e20)
> > tMon = new ( ntim, "double", "No_FillValue")
> >
> >
> > diru = "/home/Vishali/Documents/dadosVentos/Speed/"
> > filu = systemfunc("cd "+diru+" ; ls wind*nc")
> > nfilu = dimsizes(filu)
> >
> > ; calculate monthly means from 6hrly
> > nmoStrt = 0
> > nmoLast = 11
> > do nf=0,nfilu-1
> > f = addfile(diru+filu(nf), "r")
> > w = f->WSpeed
> > wMon(nmoStrt:nmoLast,:,:,:) = calculate_monthly_values(w, "avg",0,
> False)
> > nmoStrt = nmoStrt+12
> > nmoLast = nmoLast+12
> > delete(w) ; may change size next iteration (leap yr)
> > end do
> > delete(wMon&time)
> >
> > printVarSummary(wMon) ; wMon(84,17,73,144)
> >
> > time = yyyymm_time(yrStrt, yrLast, "integer")
> > wMon&time = time
> >
> > wMon!1 = "level" ; minor bug in "calculate_monthly_values"
> > wMon&level = f->level
> >
> > printVarSummary(wMon)
> >
> > ; unweighted seasonal means
> >
> > wAllSea = wgt_runave_n_Wrap(wMon, 3, 0, 0)
> > printVarSummary(wAllSea)
> >
> > wSea = wAllSea(::3,:,:,:) ; (28,14,73,144)
> > printVarSummary(wSea)
> >
> > _______________________________________________
> > 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 Jun 20 09:45:16 2011

This archive was generated by hypermail 2.1.8 : Thu Jun 23 2011 - 13:23:47 MDT