[ncl-talk] low memory algorithm for sorting ? how large is INT_MAX ?
Kevin Hallock
hallock at ucar.edu
Fri Oct 20 17:34:25 MDT 2017
Hi Adam,
Thanks for sharing the error and the code snippet.
Based on the error message, it seems like there may be an issue with the size of dtcond1d.
Could you please add “print(npts)” before “ip = dim_pqsort(dtcond1d,kflag)” and rerun the script? I’m curious what NCL thinks the dimensionality of dtcond1d is.
Thanks,
Kevin
> On Oct 20, 2017, at 5:01 PM, Adam Herrington <adam.herrington at stonybrook.edu> wrote:
>
> the error message:
>
> fatal:dim_pqsort: one or more input dimensions sizes are greater than INT_MAX
> ^Mfatal:["Execute.c":8640]:Execute: Error occurred at or near line 294 in file omega3d_pdf_samples.ncl
>
> A snippet of the code:
>
> dtcond1d = ndtooned(DTCOND)
> delete(DTCOND)
> npts = dimsizes(dtcond1d)
> kflag=2
> ip = dim_pqsort(dtcond1d,kflag)
>
> ;;95th
> tmp = npts*0.95
> iptf = tointeger(floor(tmp))
> dtlimhi(2) = dtcond1d(iptf)
>
>
>
>
> On Fri, Oct 20, 2017 at 4:17 PM, Kevin Hallock <hallock at ucar.edu <mailto:hallock at ucar.edu>> wrote:
> Hi Adam,
>
> Could you please copy and paste the full error message you’re seeing?
>
> Also, would you mind sharing a copy of your script? It might help diagnose the issue.
>
> Thanks,
> Kevin
>
> > On Oct 20, 2017, at 3:49 PM, Adam Herrington <adam.herrington at stonybrook.edu <mailto:adam.herrington at stonybrook.edu>> wrote:
> >
> > I am trying to sort with the function 'dim_pqsort', but my array is too large. I get an error saying that 1 or more dimensions is larger than INT_MAX.
> >
> > If anyone has a solution to this problem, I'm all ears.
> >
> > My thinking is that I can create an array of sample indices through 'generate_sample_indices', and make the number of sample indices = INT_MAX. Does anyone know how large INT_MAX is ?
> >
> > Adam Herrington
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171020/69d39c1e/attachment.html>
More information about the ncl-talk
mailing list