MathGroup Archive 2007

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

Search the Archive

Re: Multi-core Support in Mathematica 5.2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74195] Re: Multi-core Support in Mathematica 5.2
  • From: "Neri" <nkafkafi at yahoo.com>
  • Date: Wed, 14 Mar 2007 03:45:41 -0500 (EST)
  • References: <esu68d$rn9$1@smc.vnet.net><200703130303.WAA11010@smc.vnet.net>

Thanks, Chris. I wasn't familiar with the technical term but suspected
the answer was something like you wrote.

Still, wouldn't you say that in most everyday uses the iterations in
the Table function are independent? Wouldn't it be nice to have the
ability to tell Mathematica that I mean them to be independent
(perhaps through an option or attribute?) so Mathematica knows it is
safe to parallelize the function? Alternatively, is there a way to
replace a simple Table expression with an expression that does the
same thing but we'll be parallelized by 5.2? I have certain
computations that take many minutes, and basically they just repeat
the same calculation for independent data files. Can these be
parallelized?

Someone asked a similar question in the thread at MathGroup
http://forums.wolfram.com/mathgroup/archive/2006/Apr/msg00565.html
and I couldn't find any answer there too. Is it a thread limitation?

Thanks,
Neri

On Mar 13, 4:44 am, "Chris Chiasson" <c... at chiasson.name> wrote:
> it depends on the code executed on iterations 1 to 10...
>
> technically, any mathematica code has the ability to change non-locked functions
>
> this could affect evaluations of parts 11 to 20
>
> In[1]:=
> f[10]:=Clear@f
> f[_]=1
> Table[f@i,{i,1,20}]
>
> Out[2]=
> 1
>
> Out[3]=
> {1,1,1,1,1,1,1,1,1,Null,f[11],f[12],f[13],f[14],f[15],f[16],f[17],f[18],f[19],
>   f[20]}
>
> On 3/12/07, Neri <nkafk... at yahoo.com> wrote:
>
>
>
> > Those functions that are parallelized in the 5.2, and supposedly run
> > on more than one core simultaneously, do they run in a single thread?
>
> > Since it is demonstratively possible to parallelize these functions
> > (in one thread or more) why isn't it possible to parallelize a
> > function like Table? If I wrote a Table function with the index
> > running from 1 to 20, isn't it possible to run 1 to 10 in one core and
> > 11 to 20 in another core?
>
> > Thanks,
> > Neri
>
> > > Here is a link with some details:
>
> > >http://www.wolfram.com/products/mathematica/newin52/multicore.html
>
> > > I suspect it is hard to parallelise ordinary code - even functional code
> > > - because I can't imagine the kernel can run on more than one thread!
>
> > > David Baileyhttp://www.dbaileyconsultancy.co.uk
>
> --http://chris.chiasson.name/



  • Prev by Date: Re: Can't resize BasicInput Palette
  • Next by Date: Re: drawing with Mathematica
  • Previous by thread: Re: Re: Multi-core Support in Mathematica 5.2
  • Next by thread: Re: Multi-core Support in Mathematica 5.2