MathGroup Archive 2009

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

Search the Archive

Re: Computing resources

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98374] Re: Computing resources
  • From: Bob F <deepyogurt at gmail.com>
  • Date: Wed, 8 Apr 2009 05:02:47 -0400 (EDT)
  • References: <grcge7$ph7$1@smc.vnet.net>

On Apr 6, 3:01 am, Filippo Miatto <mia... at gmail.com> wrote:
> Dear all,
> During a long computation I opened the taskmanager in windows and I  
> realized that Mathematica (7) uses only one out of 4 cores on my  
> machine.
> Do you know why this is happening? Do you have the same problem?
> is is something that has to do with mathematica or with windows?
> Thank you in advance
> Filippo
>
> PS I'm running Mathematica 7 on a Quad core Xeon, 16Gb of ram, windows 
> professional 64 bit edition.

There are two different ways to take advantage of a multi-core machine
with Mathematica. You can assign kernels to specific notebook windows
(Mathematica does not do this automatically for you no matter how many
cores or license slots you have) using the "Evaluation/Notebook's
Kernel" menu command or even to specific cells (highlight a cell and
use the "Evaluation/Kernel Configuration" menu to assign a specific
kernel) and in both cases they need to have been previously created
with the "Evaluation/Kernel Configuration Options/Add".

There are also the new parallel routines in version 7 that will do
things automatically for you, but you need to write your code using
these parallel routines. Before version 7, you had to use an optional
package called Parallel Computing Toolkit (PCT) which was about $1000.

Look at the Documentation Center for help with the new version 7
parallel routines (see guide/ParallelComputing in the DC or on the web
at http://www.wolfram.com/products/mathematica/newin7/content/BuiltInParallelComputing/
). To learn how to create and assign a kernel to a specific notebook
read about it at http://www.wolfram.com/broadcast/screencasts/howtoconnecttoaremotekernel/?w=776&h=632
(this video talks about remote kernels but the concepts are similar
using local kernels) and also ParallelTools/tutorial/
ConfiguringAndMonitoring#25777216 in the DC. You can easily define
several local kernels with the "Evaluation/Kernel Configuration
Options" menu and call them local-2, local-3, local-4 or whatever.
Then with the "Evaluation/Notebooks Kernel" menu assign one of the
unused local-x kernels to another notebook and then execute this
notebook, and then look at the running processes and you should see
two math kernels running at maximum CPU (assuming that the first one
did not finish by the time you started the second notebook running.
You need to be careful about variables colliding with multiple running
notebooks so look at the use of contexts with variable names.

To use multiple kernels at the cell level look at how to use the
Evaluator command in the DC in ref/Evaluator - there is a keyword
called "Evaluator" that is by default set to "Local" but could be set
to any predefined kernel you created previously.

Hope that helps...

-Bob


  • Prev by Date: Re: AMERICAN MATHEMATICAL MONTHLY -April 2009:Transformations Between
  • Next by Date: dynamic popupmenu help needed
  • Previous by thread: Re: Computing resources
  • Next by thread: Show[list] does not work