Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2011

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

Search the Archive

Parellel Evaluation of Dynamic Content Within Dynamic Module

  • To: mathgroup at
  • Subject: [mg122706] Parellel Evaluation of Dynamic Content Within Dynamic Module
  • From: "Dan O'Brien" <danobrie at>
  • Date: Mon, 7 Nov 2011 05:51:40 -0500 (EST)
  • Delivered-to:


I'm wondering if there is a way to distribute the load of plotting a 
fairly complex function within DynamicModule.  The function has 
dynamically updated parameters.  A very simplified structure of my code 
is something like:

  {Func[x_, i_, params_] :=
    complicated function with dynamic parameters;
    Slider[Dynamic[parameter2]](* ect ect....*)},

         dataset[[#]] (*data i'm trying to get good starting parameters \
for fitting*)], Plot[Func[x, #, parameters], {x, xLow, xHigh}]}]] &,
    Range[number of datasets to fit]]},
  Initialization -> {assign initial values and such}]

In reality the code depends on two packages I wrote which are loaded 
prior to evaluating DynamicModule.  It would be great if I could simply 
replace Map with ParallelMap with all kernels loaded prior and contexts 
distributed appropriately.  However this does not seem to work, it is 
obvious that when I change one of my sliders that is a parameter shared 
across all data sets, each plot is evaluated sequentially and each takes 
about 2-3 seconds to plot.  From the documentation it looks like all 
variables declared in DynamicModule are owned (and evaluated in?) the 
frontend kernel... Does this deem parallel evaluation within the module 


  • Prev by Date: Re: Solving simple equations
  • Next by Date: Re: What gets put in ~/.Mathematica and why?
  • Previous by thread: Re: Scoping of pattern names
  • Next by thread: Domain of a function