MathGroup Archive 2010

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

Search the Archive

Re: Shadow error when trying to use ParallelTable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107572] Re: Shadow error when trying to use ParallelTable
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Wed, 17 Feb 2010 08:03:59 -0500 (EST)
  • References: <hl8l2g$pe8$1@smc.vnet.net> <hlb8l8$rev$1@smc.vnet.net> <hldmf3$1bu$1@smc.vnet.net>

Hi,

> I think that it's worth noting that these problems (poor attention to
> conventional Mathematic coding rules) appear throughout a number of
> non-Private` contexts of the form Parallel`*`*`.  These contexts
> appear when the Parallel Kernel Configuration panel is opened (under
> the Evaluation Menu)  is opened, Once that is done execute
> 
> Names["Parallel`*`*"]
> 
> and see the various parameter names.

The question is what is it that qualifies a namespace (context) to be
private? To my understanding it is just a convention to name contexts
that are considered private "Private`", but the actual difference is
whether a context is ever appearing on $ContextPath or not. As long as
something isn't appearing in $ContextPath I would consider it "private",
no matter what its called and it should never cause any shadow messages.
E.g. when using the standard:

BeginPackage["MyPackage`"]
Begin["`Local`"]
End[]
EndPackage[]

I would consider "MyPackage`Local`" a perfectly private context, no
matter what it is called. It's privacy is what actually makes me not
care what it is called and which symbol names are used within it.

In the case of the parallel package it looks like the functionality has
been split into some modules which implement functions in more than one
private context and to do that, you obviously need different names for
these modules, since not all can be named "Parallel`Private`". So far I
see no problems, since there shouldn't be a reason to ever call Needs[]
on one of them and they usually don't appear in $ContextPath, if I don't
make them to.

The problem seems to be that these contexts are somwhere used in an
effectively non-private way within the Parallel functionality. That
means the appear on $ContextPath along with "Global`" (or something
alike) which causes the Shadow-Messages the OP sees to appear. But this
seems to be independent of what these Contexts and the functions within
them would be called...

So I think the problem is not that there are contexts "Parallel`*`"
which contain symbols which do not meet the usual conventions but that
some of these contexts are obviously not as private as they should be.

Where do you think the "poor attention to coding rules" within a private
context would cause any problems, if the contexts would actually be
treated to really be private as my example of "MyPackag`Local`"? I also
think that the use of private contexts which are not called "Private`"
is fairly common within the rest of Mathematica (just evaluate
?*`Dump`*), too, and I also use it every once in a while...

hth,

albert


  • Prev by Date: Re: (any documentation for) linear syntax?
  • Next by Date: Re: Date & Time format..
  • Previous by thread: Re: Shadow error when trying to use ParallelTable
  • Next by thread: Washington DC Area Mathematica Special Interest Group