Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6234 > unrolled thread

Parellel Evaluation of Dynamic Content Within Dynamic Module

Started by"Dan O'Brien" <danobrie@gmail.com>
First post2011-11-07 10:53 +0000
Last post2011-11-07 10:53 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Parellel Evaluation of Dynamic Content Within Dynamic Module "Dan O'Brien" <danobrie@gmail.com> - 2011-11-07 10:53 +0000

#6234 — Parellel Evaluation of Dynamic Content Within Dynamic Module

From"Dan O'Brien" <danobrie@gmail.com>
Date2011-11-07 10:53 +0000
SubjectParellel Evaluation of Dynamic Content Within Dynamic Module
Message-ID<j98dbq$3nq$1@smc.vnet.net>
Hello,

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:

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

   Map[Dynamic[
      Show[{ListPlot[
         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 
impossible?

Thanks
-Dan

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web