Strange sdfopen templating segfault

Warren Tennant tennant at WEATHERSA.CO.ZA
Thu Jun 23 03:46:23 EDT 2005


I have experienced this same elusive "segmentation fault" for several
years and have resigned myself to the fact that GrADS does not like
something in the Linux (in my case RedHat/Fedora) libraries. The problem
gets even worse when you start mixing files with different number of
levels [e.g. uwnd (levs=17) + shum (levs=8) + slp (levs=1) ] (see
attached script).

I ran this script with the debugger (gdb) and here is what it says. Read
the comments in the script for extra info. Perhaps someone else
understands this cryptic code from gdb.... looks like library problems
to me. And as Kilian predicts, when you do not straddle the years the
script runs right through!

#########################
Config: v1.9b4 32-bit little-endian readline sdf/xdf netcdf lats athena
printim

Issue 'q config' command for more information.

Landscape mode? (no for portrait):  l
GX Package Initialization: Size = 11 8.5
ga-> run t2.gs
done mag wind
done slp (one year only)
done slp (straddle year/files)
done shum

Program received signal SIGSEGV, Segmentation fault.
0x00a29718 in strcmp () from /lib/tls/libc.so.6
(gdb)

##############################

PART II that does work
##############################
Config: v1.9b4 32-bit little-endian readline sdf/xdf netcdf lats athena
printim

Issue 'q config' command for more information.

Landscape mode? (no for portrait):  l
GX Package Initialization: Size = 11 8.5
ga-> run t2.gs
done mag wind
done slp (one year only)
done shum
done all
No hardcopy metafile open
GX package terminated

Program exited normally.
(gdb)

###################################

Maybe a clever person can help the rest of us out here??

Regards
Warren

Kilian Hagemann wrote:

>Hi guys,
>
>I'm getting a very annoying segfault when running the following script:
>
>#!/usr/local/grads/bin/gradsnc -lc
>'sdfopen uwnd.sig995.1979.nc uwnd.sig995.%y4.nc 18994'
>'sdfopen vwnd.sig995.1979.nc vwnd.sig995.%y4.nc 18994'
>'set lat -36 -21'
>'set lon 15 34'
>'d ave(mag(uwnd,vwnd.2),t=1,t=1461)'
>
>It works when I either set the final t to 1460 or less (length of any single
>NCEP Reanalysis I file) or leave out the set lat/lon statements.
>
>What gives?
>
>Using grads-1.9b3, compiled from source(no special tweaks though).
>
>--
>Kilian Hagemann
>
>Climate Systems Analysis Group
>University of Cape Town
>Republic of South Africa
>Tel(w): ++27 21 650 2748
>
>
>

--
======================================================================
 Dr Warren J Tennant: Research Scientist
 South African Weather Service, Private Bag X097, Pretoria 0001
 tennant at weathersa.co.za             http://www.weathersa.co.za
 Tel: 012-367-6004   Fax:+27(0)12-367-6189   Cell: 083-350-9021
 ** PHONE 082 162 FOR WEATHER FORECASTS **

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: script_bummer.gs
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20050623/73565c82/attachment.pl 


More information about the gradsusr mailing list