[S] Magic number 17

Wed, 17 Jun 98 08:15:37 -0500

Dear S'ers:
Please help me to resolve the foillowing problem:
I am computing a matrix "A" 20*20, each element of which is a single number
resulting from the solution of radiative transfer equation (RTE). In order to
obtain a single solution of the RTE, I need to invert several matrices 200*200.
Those matrices are needed only within the subroutine RTE and renewed for each
element of "A". All the elements require absolutely identical sequence of
computations. The calculation is organized as a double loop looking as

for ( i in 1:20){
for (j in 1:20){

I move quite successfully spending 30 seconds on each element of "A" until the
magic number 17. To compute one element of the matrix in the row #17 I spend 2
minutes, in the row 18 I spend 4 hours. I didn't try further, most probably I'll
never get the result. Funny thing is that the row #17 will still be a threshold
even if I reduce the RTE matrix to 100*100. I checked the amount of allocated
memory. It steadily grows reaching 60MgB by the row #18. Although I don't
understand why it grows (none of the intermediate results is stored), it should
not represent any problems on my Pent/400MHz with 128M RAM and object size
100MgB. Can anybody explain what is going on in S+ in this kind of situation and
how to diagnose and fix the problem?

Thanks a lot

Simon Rosenfeld
NOAA Science Center,
NESDIS/Satellite Research Lab
Camp Springs, MD
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news