Hi Carl,
What platform and ncl-version are you running on?  Can you run ncl under gdb with this script and when it SEGV's, do a "bt" command?
Curiously, the script below works fine on my 8GB Mac.  (It failed gracefully on my 4GB linux machine with a "can't allocate 3.7GB" error message).
Rick
On Feb 28, 2014, at 12:28 PM, Carl Schreck <cjschrec@ncsu.edu> wrote:
> I'm getting a seg fault when I try to subset a large file (5 GB). Consider this small example:
> 
>   path = "/snfs0/scratch/carl/u850.anom.nc"
>   inFile = addfile( path, "r" )
> 
>   x0 = 5
>   xn = 200
> 
>   data1 = inFile->u850(:,:,x0:xn)
>   printVarSummary(data1)
>   delete(data1)
> 
>   xInd = ispan(x0,xn,1)
>   data2 = inFile->u850(:,:,xInd)
>   printVarSummary(data2)
> 
> It works fine on the first attempt when I read it using a range x0:xn. However, it seg faults on the second attempt where I try to subset it by an array (xInd). The machine I'm on has 120 GB of RAM, so it shouldn't be a memory issue.
> 
> You can download the file at: 
> ftp://filsrv.cicsnc.org/carl/largeFile/
> I also made the file in NCL, so I'll be curious if it's something that's improperly formatted there.
> 
> Thanks for your help!
> 
>      Carl
> 
> -- 
> 
> 
> 
> Carl J. Schreck III, PhD
> Research Associate
> Cooperative Institute for Climate and Satellites NC
> North Carolina State University
> NOAA's National Climatic Data Center
> 151 Patton Ave, Asheville, NC 28801
> e: cjschrec@ncsu.edu
> o: +1 828 257 3140
> CycloneCenter.org: Help analyze tropical cyclones
> monitor.cicsnc.org/mjo: See recent MJO diagnostics
> _______________________________________________
> 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 Fri Feb 28 14:37:44 2014
This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST