s-news
[Top] [All Lists]

[S] Trellis gone crazy

To: s-news@wubios.wustl.edu (S-Plus list)
Subject: [S] Trellis gone crazy
From: Lutz Prechelt <prechelt@ira.uka.de>
Date: Thu, 21 Jan 1999 14:49:33 +0100
Sender: owner-s-news@wubios.wustl.edu

[ I have solved the problem now, see below, but will share my
  story anyway.
  Hope somebody can then avoid a similar mistake.
]

(This is S-Plus 3.4 on Solaris
 SunOS Dhaka 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1)


Suddenly, I don't know why, my Trellis consumes enormous amounts
of memory.

Here is an example:

1. I start Splus
   The Sqpe process size is now 8 MB 

2. motif()
   Still 8 MB (plus 5 MB for the dev.motif process)

3. x <- c(1, 2, 4, 5, 7, 8, 10, 11)
   y <- c(1, 3, 5, 3, 5, 6,  7,  8)
   Still 8 MB

4. xyplot(y~x)
   The plot comes out OK, but my process is now 93 MB
   (ninety-three megabytes!)

5. xyplot(y~x)
   xyplot(y~x)
   xyplot(y~x)
   Still 93 MB

6. xyplot(y~x|as.factor(x))
   This should produce 8 panels, each with a single point.
   During drawing the fourth, Splus stops with the message
    Error: Unable to obtain requested dynamic memory (this request is for 51296
        bytes, 171542968 bytes already in use)
    Dumped
    Error: Unable to obtain requested dynamic memory (this request is for 83168
        bytes, 171542968 bytes already in use)
    Error during wrapup
   Afterwards, the process is 153 MB.
   
I can't quite say when exactly this has started, 
but before it, I could use Trellis extensively and 
still have a process size under 30 MB.

I would be very happy about any hint where to look for the
reason of this problem.

-----

Having written this email so far, I started scrutinizing all of the
87 objects in my working directory:
I started with a clean working directory and promptly Trellis
worked normally again. Great!

Then I tried to repeat the problem by copying individual objects
from my original working directory into the clean one and trying
the above process with the 'clean' one again.

After half an hour and many failed attempts, I finally found the problem:


     I had a dataframe named 'par'.


This objects hides the par() function, which is important for Trellis.
Removing it removed the enormous Trellis memory consumption as well.
BTW, another object called 'array' apparently did not do any harm!

The problem with avoiding this type of problem is that one can have
a rather hard time thinking of the function 'par()' when once invents
the name 'par' for the dataframe holding the 'parameter sets and
results'...
I admit, that 'array' was downright stupid, though.

  Lutz
  

-----------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>