Re: Performance--Dual Core
- To: mathgroup at smc.vnet.net
- Subject: [mg70102] Re: Performance--Dual Core
- From: Antti Penttilä <Antti.I.Penttila at invalid.helsinki.fi>
- Date: Wed, 4 Oct 2006 05:58:35 -0400 (EDT)
- Organization: University of Helsinki
- References: <eftdjo$6bn$1@smc.vnet.net>
oparadis at princeton.edu 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%. Hi, 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 Variable Value: % NUMBER_OF_PROCESSORS% ---------------------------------------- Now you can try your linear algebra operations. Dot on two matrices is the best indicator of your multiprocessing capabilities. Pratik" After this fix the dual-core should work with Mathematica. However, only some operations, typically linear algebra, are threaded to parallel use. Antti