No subject


Wed Apr 14 09:33:43 EDT 2010


can rename each file so it has the year in the file name, then use the
templates option in the control file to specify the year.  Then, you only
have to use one open, and no set dfile to access each year.  This may help
your problem but I don't guarantee it.

I haven't seen this lately, but I remember there was a version of
Grads/machine combination where the job just kept growing.  It never got so
large that it exceeded the physical memory of our machine, just my job
limit, some times.  You might try to find out if you have a per job memory
limit that can be increased.

-----Original Message-----
From: Masters.Steve [mailto:masters.steve at ENSCO.COM]
Sent: Friday, April 01, 2005 1:22 PM
To: GRADSUSR at LIST.CINECA.IT
Subject: Re: GrADS crashes on multiple loops


Lifeng --

Running GrADS under Solaris, I have found that the program will
eventually crash with a segmentation fault after running long loops like
you have below.  It seems to act like a memory leak that gets out of
control.  While the problem is repeatable in the sense that long loops
always crash for me, the exact point of the crash will vary from run to
run.

I've tried reconfiguring the loops and other tricks, but the result is
always the same.  I end up having to break the job into smaller pieces
(in your case, doing one or two years at  a time), putting the final
file together manually at the end.

Steve Masters  masters.steve at ensco.com
ENSCO, Inc.
Melbourne, FL


-----Original Message-----
From: Lifeng Luo [mailto:luo at ENVSCI.RUTGERS.EDU]
Sent: Friday, April 01, 2005 3:07 PM
To: GRADSUSR at LIST.CINECA.IT
Subject: GrADS crashes on multiple loops


Hi, GrADS users,

I am using GrADS to extract time series from a grib file to ASCII format
for a selected region. I have the following 5 loop index: y, x, year,
leadtime, file. The script is quite simple, nothing fancy. But GrADS
always crashes at certain step, for example,
y=8,x=10,year=10,leadtime=3,file=10. It seems to be a memory problem
because if I change the range of y from 1-10 to 2-11, it will crash at
y=9,x=10,year=10,leadtime=3,file=10, instead of y=8.  Any ideas?  The
script is as below...

Thanks!

-Lifeng

***************************************************

'reinit'
'open file1.ctl'
'open file2.ctl'
...
...
'open file17.ctl'

*loop through all selected grids
*Here defines the region
xmn=144
xmx=152
ymn=59
ymx=68

fmt = '%-10.4f'
fmt2 = '%-6.3f'

y=ymn
while(y<=ymx)
'set y 'y
x=xmn
while(x<=xmx)
'set x 'x

'q dims'
ret=sublin(result,2)
res=subwrd(ret,6)
lon=math_format(fmt2,res)
ret=sublin(result,3)
res=subwrd(ret,6)
lat=math_format(fmt2,res)

filename=prate_01_%lat%_%lon
*say filename

*loop through all years
yr=0
while(yr<23)
year=1981+yr

t=1
while(t<=9)

ttt=t+yr*12
'set t 'ttt
record=year%" 01 "%t
f=1
while(f<=17)
'set dfile 'f
*display the variable
'd 86400*prate'
v=subwrd(result,4)
say x" "y" "yr" "t" "f" "v
mod= math_format(fmt,v)
record=record%"  "%mod
f=f+1
endwhile
res=write(filename, record)
t=t+1
endwhile
yr=yr+1
endwhile

res = close(filename)
status = sublin(res,1)
if(status != 0)
     say "close error #"status
     'quit'
endif

x=x+1
endwhile
y=y+1
endwhile

'quit'



The information contained in this email message is intended only for the use
of the individuals to whom it is addressed and may contain information that
is privileged and sensitive. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by email at the above referenced address. Thank you.



More information about the gradsusr mailing list