MathGroup Archive 2010

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

Search the Archive

Parallelize NonlinearModelFit

  • To: mathgroup at
  • Subject: [mg109554] Parallelize NonlinearModelFit
  • From: "Dan O'Brien" <obrie425 at>
  • Date: Wed, 5 May 2010 06:05:07 -0400 (EDT)

Hello everyone,

I am running Windows XP 32bit with Mathematica 7.0.1 on a dual core 
machine (2X 3.0GHz Pentium D) with 2 gigs of RAM.  I have 4 data sets of 
spectroscopic data (intensity vs. frequency data with 1340 data points 
each) that I am fitting simultaneously with shared parameters as well as 
parameters unique to an individual data set.  I can set it up to float 
or keep locked any arbitrary number of the parameters, but I usually set 
it so not more than 10 (sometimes up to 20) params float at a time.  
Computations can take minutes to hours, thus I have been looking into 
Mathematica's ability to parallelize computations.  I have some 
functions set up to define the arguements supplied to 
NonlinearModelFit.  Here is the basic order of operations:

In[13]:= LaunchKernels[]

Out[13]= {KernelObject[1, "local"], KernelObject[2, "local"]}

In[14]:= DistributeDefinitions["Global`"];

In[15]:= Parallelize[NonlinearModelFit[d, m, p, {index, \[Omega]}]]

Parallelize::nopar1: NonlinearModelFit[d,m,p,{index,\[Omega]}] cannot be 
parallelized; proceeding with sequential evaluation. >>

Here "d" "m", and "p" are formatted corrected for the necessary 
arguements for NonlinearModelFit (sequential evaluation proceeds without 
any errors).  From the documentation I believe I have set everything 
necessary to parallelize, and NonlinearModelFit should greatly benefit 
from parallelization in terms of computational time.  Is it just that 
this function hasn't been set internally by Mathematica to be able to 
thread its computations?


  • Prev by Date: Re: Definition of Deploy
  • Next by Date: Re: Return intermediate reference using Hold*****?
  • Previous by thread: Re: mathlink error handling inside :Begin: - :End:
  • Next by thread: Re: Parallelize NonlinearModelFit