MathGroup Archive 2010

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

Search the Archive

Shadow error when trying to use ParallelTable

  • To: mathgroup at
  • Subject: [mg107487] Shadow error when trying to use ParallelTable
  • From: Todd Allen <genesplicer28 at>
  • Date: Sun, 14 Feb 2010 05:59:36 -0500 (EST)

Hi Everyone,

   I am trying to accelerate some code using ParallelTable, but when I do , I get the following error message:

list::shdw: Symbol list appears in multiple contexts {Parallel`Preferences`,Global`}; definitions in context Parallel`Preferences` may shadow or be shadowed by other definitions. >>


The basic outline of my code, which itself is INSIDE a module is:

DistributeDefinitions[degenes, subraw, addonpos];

finaldegenes = 
      Flatten[Select[subraw, #1[[1]] == degenes[[i, 1]] &]][[
       addonpos]]], {i, 1, Length[degenes]}, 
     Method -> "CoarsestGrained"]], (Length[degenes[[1]]] + 


All the variables are themselves in the Global context and I can say that the code does work without error, if I comment out the DistributeDefinitions statement, and revert to a Table command rather than ParallelTable.

I have tried to fix this problem by referring to the variables by their full context name, such as: Parallel`Preferences`degenes  without success.  I have also tried localizing all variables inside the module, and I still get the shadow error regardless. 

Do you see anything obviously wrong?

What strategies do you use to figure out shadow problems in your own code?  The reason I ask, is because I have tried to further isolate this problem to see if the variable contexts are changing....but it is not obvious to me they are.

This is a frustrating one.  Thank you for any thoughts you might have!



  • Prev by Date: Re: Line into Image
  • Next by Date: Re: Line into Image
  • Previous by thread: Re: Polar coordinates - ReplaceAll issue
  • Next by thread: Re: Shadow error when trying to use ParallelTable