MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Quit versus Clear["Global`*"]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121273] Re: Quit versus Clear["Global`*"]
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 7 Sep 2011 05:38:47 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j3t5ga$58h$1@smc.vnet.net> <j3vc1k$ejo$1@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

When in doubt, Quit

Amen. Other remedies are always a kludge.

Bobby

On Tue, 06 Sep 2011 02:57:01 -0500, tenons at gmail.com <tenons at gmail.com>  
wrote:

> On Sep 4, 4:14 am, David Bailey <d... at removedbailey.co.uk> wrote:
>> On 03/09/2011 13:10, Themis Matsoukas wrote:> What is the difference  
>> between quitting the kernel and executing Clear["Global`*"]?
>>
>> > Is there a command to quit the kernel, instead of selecting  
>> Quit/Local from there Evaluate menu?
>>
>> > Thanks
>>
>> Quit[] will quit the kernel.
>>
>> Obviously Clear["Global`*"] would not clear information that might end
>> up in other contexts, whereas Quit[] will clear everything.
>>
>> I never clear the global context - I just quit the kernel one way or
>> another. Restarting the kernel used to be rather slow, but with the
>> speed of a modern PC, there really doesn't seem much point doing
>> anything else unless you specifically wish to preserve some information
>> that is not in Global`.
>>
>> I tend to quit the kernel quite a lot - e.g. between successive runs of
>> a program - why risk the confusion that can arise when two function
>> definitions end up coexisting!
>>
>> David Baileyhttp://www.dbaileyconsultancy.co.uk
>
> I agree whole-heartedly with this post.  I've found it the only way
> to stay out of trouble.
>
> I have a related problem that I hope I can get some suggestions for.
>
> GIF.exe has a memory leak (reported previously, acknowledged and is on
> someone's todo list at Wolfram, hopefully) which makes a certain set
> evaluations (which use ExportString[#,"GIF"]& extensively) unstable.
> (i.e., MathKernel crashes randomly and unceremoniously, or worse).
>
> What I would like to do is divide the set of evaluations into
> segments, run them successively quitting the MathKernel after each,
> and then restarting on the next segment.  The Quit[] clears out the
> buildup in GIF.exe. Obviously I can do this by babysitting and
> restarting each segment by hand (which I do, at approximately 15
> minute intervals, painfully wasting time).
>
> [I've tried many things including Uninstall["path/GIF.exe"] 'ing
> periodically and escaping to the shell to kill the process.  Neither
> improves stability. ]
>
> How can I carry this out automatically?
>


-- 
DrMajorBob at yahoo.com




  • Prev by Date: Re: Problem loading 3d models
  • Next by Date: Re: Quit versus Clear["Global`*"]
  • Previous by thread: Re: Quit versus Clear["Global`*"]
  • Next by thread: Re: Quit versus Clear["Global`*"]