MathGroup Archive 2009

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

Search the Archive

Re: Clear["Global'*"] not working in parallel kernels

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99336] Re: Clear["Global'*"] not working in parallel kernels
  • From: mark mcclure <mcmcclur at unca.edu>
  • Date: Sun, 3 May 2009 05:21:00 -0400 (EDT)
  • References: <gteet0$u7$1@smc.vnet.net>

On May 1, 5:20 am, AnnaDe <ucap... at ucl.ac.uk> wrote:
> I have created new kernels separate to the local kernel in
> order to be able to run several processes simultaneously
> on different processors. ... but I seem to have lost use
> of Clear["Global'*"]

Be sure to execute Clear["Global`*"] on all the sub-kernels.
For example:

In[1]:= ParallelEvaluate[x=2];
In[2]:= Clear["Global`*"];
In[3]:= ParallelEvaluate[x]
Out[3]= {2, 2}

This shows that calling Clear["Global`"] does not affect the
value of x in the sub-kernels.  Try this:

In[4]:= ParallelEvaluate[Clear["Global`*"]];
In[5]:= ParallelEvaluate[x]
Out[5]= {x, x}

Mark McClure


  • Prev by Date: Solving the system with inexact coefficients
  • Next by Date: Re: ListPointPlot3D colors from data
  • Previous by thread: Re: Clear["Global'*"] not working in parallel kernels
  • Next by thread: Re: Has Fourier been fixed in Mathematica 7