<!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>I have approx 120 mb free memory. The machine has
2GB</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If I run script with -blc it uses approx 65 mb
and exits normally.</FONT></DIV>
<DIV><FONT face=Arial size=2>If I run script through command line it uses around
7 mb and fails</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The interesting bit now is that I'm always
getting a seg fault via the command line and have not had 1 yet using the
-blc</FONT></DIV>
<DIV><FONT face=Arial size=2></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><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>