MathGroup Archive 2006

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

Search the Archive

Re: Performance--Dual Core

  • To: mathgroup at
  • Subject: [mg70102] Re: Performance--Dual Core
  • From: Antti Penttilä <Antti.I.Penttila at>
  • Date: Wed, 4 Oct 2006 05:58:35 -0400 (EDT)
  • Organization: University of Helsinki
  • References: <eftdjo$6bn$>

oparadis at wrote:
> I am puzzled by the fact mathematica seems to be using the CPU resources from a single core at the time even though the problem it tries to solve is very complicated (takes 1 day approx.). While computing, windows' task manager shows "MathKernel" using 50% of CPU and "System Idle Process" using the remaining 50%.


I had the same problem, and this trick from Pratik Desai from Wolfram 
solved the problem:

"Mathematica 5.2 defaults to using only one thread for linear algebra on 
Windows. To use multiple threads and take advantage of multiple 
processors or cores, you will need to set OMP_NUM_THREADS to a value of 
% NUMBER_OF_PROCESSORS% in your environment. You can do this by going to 
My Computer and get to the properties template by right clicking and 
clicking Properties, click the Advanced Tab and then click on 
Environment Variables. Click on New right below the System Variables 
list. In the the variable name type in OMP_NUM_THREADS and variable 
value type in % NUMBER_OF_PROCESSORS%

Variable Name : OMP_NUM_THREADS

Now you can try your linear algebra operations. Dot on two matrices is 
the best indicator of your multiprocessing capabilities.


After this fix the dual-core should work with Mathematica. However, only 
some operations, typically linear algebra, are threaded to parallel use.


  • Prev by Date: Re: variance of product of random variables
  • Next by Date: Re: Bessel K expansion, large argument?
  • Previous by thread: Performance--Dual Core
  • Next by thread: Re: Performance--Dual Core