<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16609" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Jennifer,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem is now occurring inconsistently in both
batch mode and from command line. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've tried using top to examine the memory and
there is no issue here. I've also cleared cache memory i.e. "echo 1 >
drop_caches"</FONT></DIV>
<DIV><FONT face=Arial size=2>I've also tried rebooting and this has made no
difference either. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've managed to get the following below through gdb
and also have a core which I generated through gdb (21mb).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any suggestions moving forward?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Steven</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>linux-3vnb:/home/wavescape/grads-2.0.a1/work # gdb
grads<BR>GNU gdb 6.6.50.20070726-cvs<BR>Copyright (C) 2007 Free Software
Foundation, Inc.<BR>GDB is free software, covered by the GNU General Public
License, and you are<BR>welcome to change it and/or distribute copies of it
under certain conditions.<BR>Type "show copying" to see the conditions.<BR>There
is absolutely no warranty for GDB. Type "show warranty" for
details.<BR>This GDB was configured as "i586-suse-linux"...<BR>Using host
libthread_db library "/lib/libthread_db.so.1".<BR>(gdb) set args -b<BR>(gdb)
run<BR>Starting program: /home/wavescape/grads-2.0.a1/bin/grads -b</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Grid Analysis and Display System (GrADS) Version
2.0.a1<BR>Copyright (c) 1988-2008 by Brian Doty and the<BR>Institute for Global
Environment and Society (IGES)<BR>GrADS comes with ABSOLUTELY NO WARRANTY<BR>See
file COPYRIGHT for more information</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Config: v2.0.a1 little-endian readline printim
grib2 netcdf hdf4-sds<BR>Issue 'q config' command for more
information.<BR>Landscape mode? ('n' for portrait):<BR>GX Package
Initialization: Size = 11 8.5<BR>Running in Batch mode<BR>ga->
wavescape.gs</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Program received signal SIGSEGV, Segmentation
fault.<BR>0x0808a4cd in gsfmath (pcmn=0x37333237, mathflg=875771443) at
gscrpt.c:3313<BR>3313 gscrpt.c: No such file or
directory.<BR> in gscrpt.c<BR>(gdb)
where<BR>#0 0x0808a4cd in gsfmath (pcmn=0x37333237,
mathflg=875771443)<BR> at gscrpt.c:3313<BR>#1 0x31363930
in ?? ()<BR>#2 0x37333237 in ?? ()<BR>#3 0x34333633 in ??
()<BR>#4 0x34303538 in ?? ()<BR>#5 0x33303030 in ?? ()<BR>#6
0x38353936 in ?? ()<BR>#7 0x36313937 in ?? ()<BR>#8 0x30393835 in ??
()<BR>#9 0x37363538 in ?? ()<BR>#10 0x34363533 in ?? ()<BR>#11 0x33373430
in ?? ()<BR>#12 0x34383432 in ?? ()<BR>#13 0x33313635 in ?? ()<BR>#14 0x32383239
in ?? ()<BR>#15 0x32343937 in ?? ()<BR>#16 0x34363138 in ?? ()<BR>#17 0x30363634
in ?? ()<BR>#18 0x30333338 in ?? ()<BR>#19 0x35383930 in ?? ()<BR>#20 0x39343830
in ?? ()<BR>#21 0x35343039 in ?? ()<BR>#22 0x36323934 in ?? ()<BR>---Type
<return> to continue, or q <return> to quit---<BR>#23 0x34373033 in
?? ()<BR>#24 0x33393437 in ?? ()<BR>#25 0x32383335 in ?? ()<BR>#26 0x33333838 in
?? ()<BR>#27 0x35393431 in ?? ()<BR>#28 0x36333338 in ?? ()<BR>#29 0x0030302e in
?? ()<BR>#30 0x00000001 in ?? ()<BR>#31 0x00000000 in ??
()<BR>(gdb)</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jma@COLA.IGES.ORG href="mailto:jma@COLA.IGES.ORG">Jennifer Adams</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=GRADSUSR@LIST.CINECA.IT
href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, March 20, 2008 10:07
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: grads-2.0.a1 segmentation
fault</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR></DIV><BR>
<DIV>On Mar 20, 2008, at 3:25 PM, Steven Weiss wrote:<BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite"><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0">
<DIV><FONT face=Arial size=2>Hi Jennifer,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I think I may have discovered the area where
the problem lies. Its difficult to prove due to the inconsistency and nature
of the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>1. grads -blc 'myscript.gs' -
produced no seg faults in 10 runs</FONT></DIV>
<DIV><FONT face=Arial size=2>2. grads -b</FONT></DIV>
<DIV><FONT face=Arial size=2>landscape</FONT></DIV>
<DIV><FONT face=Arial size=2>myscript.gs</FONT></DIV>
<DIV><FONT face=Arial size=2>produced seg faults approx 30% of the
time.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>It may just be an anomaly but the software
appears to be more stable with the -blc. </FONT></DIV></SPAN></BLOCKQUOTE>I
think this is a red herring. </DIV>
<DIV><BR>
<BLOCKQUOTE type="cite"><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0">
<DIV><FONT face=Arial size=2>This I can live with. Time will tell I
guess.</FONT></DIV></SPAN></BLOCKQUOTE>Try Arlindo's suggestion to track your
memory use with 'top' . That may provide more clues. </DIV>
<DIV>Jennifer</DIV>
<DIV><BR>
<BLOCKQUOTE type="cite"><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0">
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Steven</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message -----</DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND-COLOR: rgb(228,228,228); -webkit-background-clip: initial; -webkit-background-origin: initial"><B>From:</B><SPAN
class=Apple-converted-space> </SPAN><A title=jma@COLA.IGES.ORG
href="mailto:jma@COLA.IGES.ORG">Jennifer Adams</A></DIV>
<DIV style="FONT: 10pt arial"><B>To:</B><SPAN
class=Apple-converted-space> </SPAN><A title=GRADSUSR@LIST.CINECA.IT
href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</A></DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B><SPAN
class=Apple-converted-space> </SPAN>Thursday, March 20, 2008 8:47
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B><SPAN
class=Apple-converted-space> </SPAN>Re: grads-2.0.a1 segmentation
fault</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV><BR>
<DIV>On Mar 20, 2008, at 1:50 PM, Steven Weiss wrote:<BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV style="MARGIN: 0px">Hi Jennifer,</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">Yes, I am looping around the time variable and
calling a number of nested</DIV>
<DIV style="MARGIN: 0px">functions that return a string variable which I
print to a file.</DIV>
<DIV style="MARGIN: 0px">The problem is that its inconsistent so its
hard to put the debug code in.</DIV>
<DIV style="MARGIN: 0px">The script is approx 1000
lines.</DIV></BLOCKQUOTE>
<DIV>At the very least you could put something in to say what time step
you're at.</DIV><BR>
<BLOCKQUOTE type="cite">
<DIV style="MARGIN: 0px">There is no core.</DIV></BLOCKQUOTE>Use 'limit
coredumpsize unlimited' to get core files. On a mac, they get put in
/cores <BR>
<BLOCKQUOTE type="cite">
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">I will have to try see if I can catch
it.</DIV></BLOCKQUOTE>Can't really help without more specific info. What
data type are you using??</DIV>
<DIV><BR>
<BLOCKQUOTE type="cite">
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><SPAN class=Apple-style-span
style="-webkit-text-stroke-width: -1px">Is there no possibility that you
can run in debug mode e.g. grads --debug?</SPAN></DIV></BLOCKQUOTE>What
would you have 'grads --debug' do for you? </DIV>
<DIV><BR></DIV>
<DIV>You can try running grads inside the GNU debugger... </DIV>
<DIV>> gdb grads</DIV>
<DIV>...</DIV>
<DIV>(gdb) set args -lbc 'myscript.gs'</DIV>
<DIV>(gdb) run</DIV>
<DIV><BR></DIV>
<DIV>... then, when it seg faults, use the 'where' command to find out
what caused the crash. </DIV>
<DIV><BR></DIV>
<DIV>Jennifer</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>
<BLOCKQUOTE type="cite">
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">Regards</DIV>
<DIV style="MARGIN: 0px">Steven</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">----- Original Message -----</DIV>
<DIV style="MARGIN: 0px">From: "Jennifer Adams" <<A
href="mailto:jma@COLA.IGES.ORG">jma@COLA.IGES.ORG</A>></DIV>
<DIV style="MARGIN: 0px">To: <<A
href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</A>></DIV>
<DIV style="MARGIN: 0px">Sent: Thursday, March 20, 2008 6:28 PM</DIV>
<DIV style="MARGIN: 0px">Subject: Re: grads-2.0.a1 segmentation
fault</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<BLOCKQUOTE type="cite">
<DIV style="MARGIN: 0px">On Mar 20, 2008, at 8:10 AM, Steven Weiss
wrote:</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<BLOCKQUOTE type="cite">
<DIV style="MARGIN: 0px">Hi,</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">I'm running grads 2.0.a1 on Suse Linux and
every so often I get a</DIV>
<DIV style="MARGIN: 0px">segmentation fault. Its very inconsistent.
The only thing I can see</DIV>
<DIV style="MARGIN: 0px">is that</DIV>
<DIV style="MARGIN: 0px">it is always during writing out a file.
i.e. rc= write (filename,</DIV>
<DIV style="MARGIN: 0px">variable).</DIV>
<DIV style="MARGIN: 0px">From looking at the file, the variable data
is normally only half</DIV>
<DIV style="MARGIN: 0px">written</DIV>
<DIV style="MARGIN: 0px">and the problem is not always in the same
place.</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">How can I go about identifying what the
problem is?</DIV></BLOCKQUOTE>
<DIV style="MARGIN: 0px">Well ...</DIV>
<DIV style="MARGIN: 0px">I can't fix I bug I can't reproduce, so you
have to find a way to get</DIV>
<DIV style="MARGIN: 0px">GrADS to seg fault reliably. Try putting some
debugging statements in</DIV>
<DIV style="MARGIN: 0px">your script so you'll know where it's dying,
e.g. if it happens</DIV>
<DIV style="MARGIN: 0px">during a loop. There are some known problems
in 2.0.a1 that have</DIV>
<DIV style="MARGIN: 0px">already been addressed ... what data type are
you using?</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">If you've got a core file, you can try using
gdb (gnu debugger) to</DIV>
<DIV style="MARGIN: 0px">see where it died:</DIV>
<DIV style="MARGIN: 0px">> gdb grads</DIV>
<DIV style="MARGIN: 0px">...</DIV>
<DIV style="MARGIN: 0px">(gdb) core your.core.filename</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV style="MARGIN: 0px">Then gdb will say where in the GrADS code it
was when it seg faulted.</DIV>
<DIV style="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV
style="MARGIN: 0px">Jennifer</DIV></BLOCKQUOTE></BLOCKQUOTE></DIV><BR>
<DIV><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto"><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto"><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto">
<DIV>--</DIV>
<DIV>Jennifer M. Adams</DIV>
<DIV>IGES/COLA</DIV>
<DIV>4041 Powder Mill Road, Suite 302</DIV>
<DIV>Calverton, MD 20705</DIV>
<DIV><A href="mailto:jma@cola.iges.org">jma@cola.iges.org</A></DIV>
<DIV><BR class=khtml-block-placeholder></DIV><BR
class=Apple-interchange-newline></SPAN></SPAN></SPAN></DIV><BR></BLOCKQUOTE></SPAN><BR
class=Apple-interchange-newline></BLOCKQUOTE></DIV><BR>
<DIV><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto"><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto"><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; border-spacing: 0px 0px; -khtml-text-decorations-in-effect: none; -apple-text-size-adjust: auto">
<DIV>--</DIV>
<DIV>Jennifer M. Adams</DIV>
<DIV>IGES/COLA</DIV>
<DIV>4041 Powder Mill Road, Suite 302</DIV>
<DIV>Calverton, MD 20705</DIV>
<DIV><A href="mailto:jma@cola.iges.org">jma@cola.iges.org</A></DIV>
<DIV><BR class=khtml-block-placeholder></DIV><BR
class=Apple-interchange-newline></SPAN></SPAN></SPAN></DIV><BR></BLOCKQUOTE></BODY></HTML>