MathGroup Archive 2008

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

Search the Archive

Re: Enable multicore calculation ?

  • To: mathgroup at
  • Subject: [mg88219] Re: Enable multicore calculation ?
  • From: Michael Weyrauch <michael.weyrauch at>
  • Date: Mon, 28 Apr 2008 04:41:56 -0400 (EDT)
  • References: <fuumac$877$> <fuv09k$eje$> <fv1fhg$esj$>
  • Reply-to: michael.weyrauch at

Hello Szbolcs,

   I am not competent enough to answer such questions, as I have no 
knowledge how the various functions you mention are implemented.

It is just my experience that "analytic" calculations using Map, Apply 
Inner and all that never seem to use multicores (in my particular 

Up to now I only experienced multicore use in calculations using 
NDSolve, where the calculation of the "right hand side" of a large set
of coupled ordinary differential equations requires the inversion of
matrices. So I must say that I do not even know which part
of the numerical calculation uses multicore, Inverse[] or NDSolve[]
itselve. I just see from the Linux process monitor that CPU usage
is nearly 400% on an eight processor machine, from which I conclude that
my calculation uses 4 processors (hopefully correct).

I guess we would need somebody from WRI to enlighten us here...


Szabolcs Horvát schrieb:
> Michael Weyrauch wrote:
>> Hello,
>>    I run some larger calculations on Linux with Mathematica and 
>> 8 cores essentially using NDSolve, and these calculations definitly use
>> usually 4 cores without any interference from my side. Mathematica
>> seems to detect the multicore environment automatically and the
>> software acts then accordingly. In a sense I was (positively) surprised.
>>    However, not everything in Mathematica supports multicore, and it is
>> my guess and partly my experience that it is mostly (maybe only) 
>> numerical stuff which uses multicores.
> Dear Michael,
> I do not have access to any multiprocessor machines which have 
> Mathematica.  I am curious:  do functions like Map or Inner use multiple 
>   processors (in principle it is easy to parallellize these)?  More 
> generally, can those functions that call other Mathematica functions use 
> more than one processor?  Or is this capability restricted to built-in 
> operations that are implemented at a lower level than the Mathematica 
> language (such as numerical linear algebra)?
> Is it guaranteed that Map evaluates the elements of a list in order? 
> What about misuses such as the following:
> a = 123;
> Map[(a = 100 + Mod[a, #]) &, {5, 6, 7, 8}];
> a
> (Actually this one must be pretty hard to parallellize even if there are 
> no guarantees about evaluation order.)
> Szabolcs

  • Prev by Date: Re: Wolfram User Interface Research?
  • Next by Date: Re: Cropping a surface to a sphere
  • Previous by thread: Re: Enable multicore calculation ?
  • Next by thread: Re: Enable multicore calculation ?