MathGroup Archive 2011

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

Search the Archive

Re: How to Assign Different Kernel To Different Notebook?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118423] Re: How to Assign Different Kernel To Different Notebook?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 27 Apr 2011 07:24:45 -0400 (EDT)

On Wed, 27 Apr 2011 05:38:49 -0400 (EDT), Afolabicrystal wrote:
> Hello Group,
>
> My PC is an i7 with Quad Core, i.e. 4 processors so I can run multiple
> kernels.
>
> I presently have to manually select Evaluation >> Notebook's Kernel >>
> "KernelName" to select one of my 4 kernels which I have set up to
> compute some problems. Each problem takes an average of 3-4 hrs to
> compute and I have 4-5 of such computations to do.
>
> Sometimes I 4get to select different Kernel and then the job gets
> pooled, waiting for another job to finish using the kernel. If I use
> "Quit" to stop the pooled job, mathematica stops all associated job to
> that kernel.
>
> Now, is there a code or function in mathematica to include in my
> initialization cell to instruct ..mathetica to select specific kernel
> for particular notebook?
>
> thank so much for the anticipated suggestions.

The Notebook's Kernel setting is saved with the notebook, so you can certainly
set and forget it.  I'm not sure exactly what your workflow is that this hasn't
become apparent to you.  Perhaps you're creating fresh notebooks
programmatically each time?  If so, then you can pass the Evaluator option to
the notebook creation function with the appropriate value.  It would be easy
enough, for example, to create a palette which will create a new notebook
appropriate kernel assigned in one click.

A couple of other options...you can also set the Evaluator option in a named
style.  So, it's possible to have multiple Input styles, each of which uses a
different Evaluator.  If you do this, I'd recommend making some other notable
change to the style as well, such as a colored background or cell frame, so that
you can easily tell the difference visibly.

Also, if the only problem is that you've pressed Shift+Enter to queue up the
evaluation and you want to remove it, that's really easy.  If the evaluatio n
hasn't begun yet, you can remove it from the queue by selecting the affecte d
cell and using Evaluation->Remove from Evaluation Queue menu item.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


  • Prev by Date: Re: Drawing a vector list
  • Next by Date: Re: Learning Mathematica with neat projects
  • Previous by thread: Re: How to Assign Different Kernel To Different Notebook?
  • Next by thread: Output Precision Exploration