[ncl-talk] Segfault error with Wavelet function in cygwin/x

Mary Haley haley at ucar.edu
Fri Apr 21 08:31:23 MDT 2017


Dear Dipti,

I was able to reproduce this problem on my Cygwin system at home, but I
didn't have much time to debug it.

Kevin tried your script on a Mac system, and I tried it on both a 32-bit
and 64-bit Linux system and it worked fine.  So, it seems to be limited to
Cywgin.

I will look into this over the weekend.

Meanwhile, is your system a 64-bit system running Windows 10?  If so, then
you might want to consider using Window's Linux subsystem instead of Cygwin
for your UNIX environment.  I'm guessing that your wavelet program might
work under this system.

Please see this link for more information:

http://www.ncl.ucar.edu/Download/windows_linux_subsystem.shtml


--Mary


On Thu, Apr 20, 2017 at 6:05 PM, Kevin Hallock <hallock at ucar.edu> wrote:

> Hi Dipti,
>
> I tried to run your script on my Mac, but it ran successfully without a
> segfault. We will find a Windows system with cygwin to test your script on
> and will respond again soon.
>
> Kevin
>
> > On Apr 19, 2017, at 12:23 PM, Dipti Sharma <sdipti596 at gmail.com> wrote:
> >
> > Dear All,
> >
> > I am trying to understand how to do the wavelet analysis using NCL. I am
> using ncl v6.4.0 in cygwin/x. I started using an example code and the data
> that are available online. But I got an error message as "segmentation
> fault (core dumped)" when I ran the program. I have given the code that I
> used as below for you to review. Also I have attached the data I used in
> the email.
> >
> > So, could you please suggest me how I solve this problem?
> >
> > Thanks in advance.
> >
> > Dipti S.
> >
> > THE CODE is here and the data is attached in the email,
> >
> >  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> >  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> >  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> >  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> >  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> >
> > ;--------------------------------------------------------------------
> > ; CREATE SAME WAVELET FIGURE AS TORRENCE & COMPO using seasonal Nino3
> > ; from 1871-1997
> > begin
> > ninoseas = asciiread("C:\diptic\sst\sst_nino3.dat",-1,"float")
> >   ninoseas!0 = "time"
> >   ntime = dimsizes(ninoseas)
> >   timeo = fspan(1871.25,1996.,ntime)
> >   print(ntime)
> >   ninoseas&time = timeo
> >   ninomam = dim_avg_Wrap(ninoseas(0::4))
> >   ninojja = dim_avg_Wrap(ninoseas(1::4))
> >   ninoson = dim_avg_Wrap(ninoseas(2::4))
> >   ninodjf = dim_avg_Wrap(ninoseas(3::4))
> >   ninoseas(0::4) = ninoseas(0::4) - ninomam
> >   ninoseas(1::4) = ninoseas(1::4) - ninojja
> >   ninoseas(2::4) = ninoseas(2::4) - ninoson
> >   ninoseas(3::4) = ninoseas(3::4) - ninodjf
> >   time  = timeo
> >   N     = dimsizes(time)
> > ;_FillValue=1e+36
> > ;printMinMax(ninoseas,False)
> > ;return
> > ;************************************
> > ; compute wavelet
> > ;************************************
> >   mother  = 0
> >   param   = 6.0
> >   dt      = 0.25    ;timesteps in units of years
> >   s0      = dt
> >   dj      = 0.25
> >   jtot    = 1+floattointeger(((log10(N*dt/s0))/dj)/log10(2.))
> >   npad    = N
> >   nadof   = 0.0
> >   noise   = 1
> >   siglvl  = 0.05
> >   isigtest= 0
> > print(nadof)
> > w =wavelet(ninoseas,mother,dt,param,s0,dj,jtot,npad,noise,
> isigtest,siglvl,nadof)
> > printVarSummary(w)
> > return
> > end
> > ;;; This is the output I received,
> >
> > Variable: ntime
> > Type: integer
> > Total Size: 4 bytes
> >             1 values
> > Number of Dimensions: 1
> > Dimensions and sizes:   [1]
> > Coordinates:
> > (0)     504
> > (0)     min=-1.8504   max=2.49921
> >
> > Variable: nadof
> > Type: float
> > Total Size: 4 bytes
> >             1 values
> > Number of Dimensions: 1
> > Dimensions and sizes:   [1]
> > Coordinates:
> > (0)      0
> > Segmentation fault (core dumped)
> >
> >
> > <sst_nino3.dat>_______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170421/5c592cbf/attachment.html 


More information about the ncl-talk mailing list