Re: Why segmental fault?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 13 Jul 2006 16:25:24 -0600 (MDT)

Hi Jax,

NCL should be able to handle the size of the data files that you
mention, but maybe there's something in your script that is causing it
to run out of memory. A few possible culprits are:

   1. You are creating a lot of local variables (or else a few really
      big ones), and not freeing them up after you are finished with them
      (with a call to "delete(xxx)").

   2. You have some do loops with a lot of code in them.

   3. You have some heavily nested do loops.

   4. You are writing a netCDF file the "inefficient" way.

Please look over your script and see if you have anything like the above
that you might be able to clean up. #1-3 should be fairly straightforward,
and with #2 and 3, it can really help if you move code outside a "do"

With #4, it can be a bit more involved. If you are writing lots of
netCDF files, or a lot of variables to one netCDF file, Please see:

for information on the efficient way to write netCDF files.

If none of the above helps, then you can email me the script and
I'll take a look at it.


On Thu, 13 Jul 2006, Jax (Guangxia) Cao wrote:

> Hi,
> I have written a NCL script to pick up the inversion base height from the
> WRF outputs, run by myself. I have about 20 files for a month run, each file
> 1.7 Gb. The NCL script, composed of 130 lines in total, would run about 2
> hours and process about 10 files, and
> feel tired, giving me an segmental fault demonstration. Then I run
> again from the tired point it will be ok to finish the rest or run for
> another 2+ hours if the computer goes slow. I have used both old
> (PIII) and new (Intel xeon 3.20 GHz, 2MB L2 Cashe, and 4 GB DDR2 SDRAM) linus computer
> and had the same story.
> My linux machine:
> [root_at_localhost cjan]# uname -a
> Linux localhost.localdomain 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST
> 2005 i686 i686 i386 GNU/Linux
> Although NCL may not aim to handle the problem I have, I find it quite
> efficient and simple to process netcdf files compared to other power tools
> such as Matlab and Fortran.
> I would appreciate any suggestion.
> Thank you.
> Jax
> _______________________________________________
> ncl-talk mailing list
ncl-talk mailing list
Received on Thu Jul 13 2006 - 16:25:24 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 17 2006 - 11:02:00 MDT