MathGroup Archive 2007

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

Search the Archive

Re: Launching Mathematica kernel with Windows 'start' command in order to customise the priority of the kernel process

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76130] Re: [mg76009] Launching Mathematica kernel with Windows 'start' command in order to customise the priority of the kernel process
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 16 May 2007 05:46:50 -0400 (EDT)
  • Reply-to: jfultz at wolfram.com

Under Windows, the kernel takes the command-line argument...

-threadpriority=n

where n can be -2, -1, 0, 1, or 2.  This is the relative thread priority to the 
default priority with which the kernel was launched (negative being lower 
priority).

A word of warning...this is not such a great idea in version 6.  It was with
great difficulty that we tuned the thread priorities under Windows so that both 
the kernel and the FE would be responsive in a world of Manipulate and Dynamic.

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

On Mon, 14 May 2007 05:53:08 -0400 (EDT), Andrew Moylan wrote:
> Hi all,
>
> Like some previous posters (http://groups.google.com/group/comp.soft-
> sys.math.mathematica/browse_thread/thread/264aaac68d41add2?tvc=2&q=
> %22shell+command%22#), I'd love to configure the Mathematica kernel
> attached to my front end to automatically start and run at a lower
> priority in Windows. The Windows "start" command has been suggested
> for this purpose, and would seem ideal, but I have had no success with
> it. Here is what I've tried:
>
> Under "Advanced Options" in the Kernel configuration, the following
> works just fine to create a (normal priority) local kernel:
>
> Arguments to MLOpen: -LinkMode Listen -LinkName "test"
> Shell command to launch kernel: mathkernel -mathlink -LinkMode Connect
> -LinkName "test"
>
> Starting here, I would assume that making the following adjustment
> would be adequate to change the priority:
>
> Shell command to launch kernel: start /low mathkernel -mathlink -
> LinkMode Connect -LinkName "test"
>
> Unfortunately, for reasons unknown to me, making that change causes
> the kernel to fail to start. The symptons are: Kernel menu -> Start
> Kernel -> [click on kernel name] -> [nothing apparently happens at
> all]. Here are some other shell commands I have tried, with identical
> symptoms:
>
> Shell command to launch kernel: start /wait mathkernel -mathlink -
> LinkMode Connect -LinkName "test"
> Shell command to launch kernel: start mathkernel -mathlink -LinkMode
> Connect -LinkName "test"
> Shell command to launch kernel: start "title" /wait mathkernel -
> mathlink -LinkMode Connect -LinkName "test"
> Shell command to launch kernel: start "title" mathkernel -mathlink -
> LinkMode Connect -LinkName "test"
> and all of the above with 'mathkernel' replaced by the full path to
> MathKernel.exe.
>
> Note that opening a Windows command prompt and typing any of the above
> works just fine to start mathkernel; but for reasons unknown, none of
> them appear to do anything when used in the "Shell command to launch
> kernel" box.
>
> The following is probably related: if I create a batch file,
> startkernel.bat, and place the relevant shell command into it (any of
> the above, including those that don't use the 'start' command and
> instead directly run mathkernel.exe), I experience the same symptoms.
>
> Any ideas?
>
> Cheers,
>
> Andrew




  • Prev by Date: Re: Where is the Mathematica Book in Documentation Center?
  • Next by Date: Re: Re: Compatibility woes
  • Previous by thread: Launching Mathematica kernel with Windows 'start' command in order to customise the priority of the kernel process
  • Next by thread: Integrate[s^s(1-s)^(1-s)Sin[Pi s],{s,0,1}]