Re: segmentation fault

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 04 2011 - 08:27:43 MST

I speculate that you are encountering a memory problem

It would be far more helpfull if you included the output from
   printVarSummary(u0Jan81)
====
How much memory do you have available?
[Do a "top" from the command line and look in the upper left]

What version of NCL are you using and what OS?

%> ncl -V
%> uname -a

Also, change
  ps1Jan81 = w0->PS(:,:,:) ;(time,lat,lon)
to
  ps1Jan81 = w0->PS ;(time,lat,lon)
Slightly, more efficient.

On 3/4/11 6:29 AM, JEFFREY JOSEPH WATERS wrote:
> NCL,
> I am currently running a script that first reads in several variables
> from several NetCDF files. I am concerned, however, because although the
> script runs, there is always a "segmentation fault" message at the
> bottom of my output terminal. I've verified the contents/variables of
> these files I am trying to access actually exist. Is it possible that
> I'm using too much memory on my computer to read in this data? If not,
> what are the other possible explanations to this problem and how do I
> fix it? Any feedback would be much appreciated. Thank you so much.
>
> This is a copy of the first portion of my script:
>
> ;***********************************************************
> 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"
>
> ;***********************************************************
>
> external POTENTIALINTENSITY "./PotentialIntensity.so"
>
> begin
>
> ;******************** USER DEFINED VARIABLES***********************
> dir="/mc1s1/s4/jjw348/historicalSST_monthly/"
>
> file_obs = "cam3.1.ctl.t85_observed_monthly_1979_2000.cam2.h0.1981-01.nc"
> w0=addfile(dir+file_obs,"r")
> lat0 = w0->lat
> lon0 = w0->lon
> u0Jan81 = w0->U ;(time,lev,lat,lon)
> v0Jan81 = w0->V ;(time,lev,lat,lon)
> tempJan81 = w0->T ;(time,lev,lat,lon)
> rh_obsJan81= w0->RELHUM ;(time,lev,lat,lon)
> lev = w0->lev
> P0 = 1! 000.
> hyam = w0->hyam
> hybm = w0->hybm
> ps1Jan81 = w0->PS(:,:,:) ;(time,lat,lon)
> slpJan81 =w0->PSL
>
> print(lon0)
>
> exit
>
>
>
> And here is the following output:
>
> ...
> ...
> ...
> (224) 315
> (225) 316.40625
> (226) 317.8125
> (227) 319.21875
> (228) 320.625
> (229) 322.03125
> (230) 323.4375
> (231) 324.84375
> (232) 326.25
> (233) 327.65625
> (234) 329.0625
> (235) 330.46875
> (236) 331.875
> (237) 333.28125
> (238) 334.6875
> (239) 336.09375
> (240) 337.5
> (241) 338.90625
> (242) 340.3125
> (243) 341.71875
> (244) 343.125
> (245) 344.53125
> (246) 345.9375
> (247) 347.34375
> (248) 348.7! 5
> (249) 350.15625
> (250) 351.5625!
> (251 ) 352.96875
> (252) 354.375
> (253) 355.78125
> (254) 357.1875
> (255) 358.59375
> Segmentation fault
>
>
> Jeff Waters
> Graduate Student
> Department of Meteorology
> Penn State University '11
>
>
>
>
> _______________________________________________
> 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 Mar 4 08:27:50 2011

This archive was generated by hypermail 2.1.8 : Mon Mar 07 2011 - 15:20:58 MST