Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: RE: Re: OS memory availability


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: RE: Re: OS memory availability
Date   Tue, 30 Mar 2004 23:41:30 +0100

r() stuff: good idea, but I see no typo (or even "type"). 
The variable names v1, v2, ... are useless here. 

Nick 
n.j.cox@durham.ac.uk 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Michael
> Blasnik
> Sent: 30 March 2004 23:31
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Re: RE: Re: OS memory availability
> 
> 
> This should be quite handy.   It would be worthwhile to make 
> it rclass and
> leave behind key info in r(), such as r(freephysicalmemory).  
> Also, the
> listing of info has a small type:
> 
> di as txt `v'[1] ": " `v'[2]
> 
> should be:
> 
> di as txt "`v':  "` v'[1]
> 
> Michael Blasnik
> michael.blasnik@verizon.net
> 
> ----- Original Message ----- 
> From: "Nick Cox" <n.j.cox@durham.ac.uk>
> To: <statalist@hsphsun2.harvard.edu>
> Sent: Tuesday, March 30, 2004 5:17 PM
> Subject: st: RE: Re: OS memory availability
> 
> 
> > I built a bit on Kevin's useful idea.
> > If you don't see the downside of this
> > program, don't use it. If you want to
> > build on it, feel free.
> >
> > program systeminfo
> > version 8
> > tempfile file
> > preserve
> > clear
> > shell systeminfo /FO CSV > `file'
> > qui insheet using `"`file'"', comma
> >
> > foreach v of var * {
> > di as txt `v'[1] ": " `v'[2]
> > }
> > end
> >
> >
> > Nick
> > n.j.cox@durham.ac.uk
> >
> > > -----Original Message-----
> > > From: owner-statalist@hsphsun2.harvard.edu
> > > [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of 
> Kevin Turner
> > > Sent: 30 March 2004 22:40
> > > To: statalist@hsphsun2.harvard.edu
> > > Subject: st: Re: OS memory availability
> > >
> > >
> > > Fred Wolfe <fwolfe@arthritis-research.org> writes:
> > >
> > > >Thanks for the comments. I wrote the following program to
> > > try to get at the
> > > >issue. It reports back the level of memory that does not get
> > > an "op. sys.
> > > >refuses to provide memory" error.
> > >
> > > Like Fred, I've placed -set mem- inside of a for loop and
> > > captured the highest
> > > value that Stata can successfully allocate. I don't know if
> > > there is a way to
> > > obtain the highest value apart from experimentation because
> > > the value is
> > > not guaranteed to be constant over time. The reason for this
> > > is that, on
> > > Windows, it represents the largest _continuous_ free block of
> > > memory. As
> > > programs request and free up portions of memory, this space
> > > can potentially
> > > change in size.
> > >
> > > However, if you want to dynamically find the amount of
> > > physical memory (like
> > > David was asking) you can get this value using a DOS command.
> > >
> > > From Stata:
> > >
> > > . shell systeminfo /FO CSV > systeminfo.csv
> > > . insheet using systeminfo.csv, comma
> > >
> > > This imports a dataset with various system 
> specifications. The first
> > > observation contains all the variable names and the second
> > > observation contains
> > > their values. Get the values you want and then clear the dataset.
> > >
> > > To prevent thrashing of virtual memory, stay at or below the
> > > value in v23 and
> > > make sure that Stata is not competing for memory resources
> > > with another
> > > running program.
> > >
> > > . list v23 in 2
> > >
> > > Hope this helps,
> > >
> > > --Kevin
> > > kturner@stata.com
> > > *
> > > *   For searches and help try:
> > > *   http://www.stata.com/support/faqs/res/findit.html
> > > *   http://www.stata.com/support/statalist/faq
> > > *   http://www.ats.ucla.edu/stat/stata/
> > >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/support/faqs/res/findit.html
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index