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


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

Parellel Evaluation of Dynamic Content Within Dynamic Module

From "Dan O'Brien" <danobrie@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Parellel Evaluation of Dynamic Content Within Dynamic Module
Date 2011-11-07 10:53 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j98dbq$3nq$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web