Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Special Ways to Run the Kernel

Your first calculation in a Mathematica session will automatically start a kernel. You can also run the Mathematica kernel directly from a command line or run a Mathematica kernel on a remote machine.

To run the kernel from a command line:

  1. Type math at a command line and then press EnterKey to start the kernel. All Mathematica input and output will appear in the command-line window.

To launch the kernel on Mac OS X, type the full pathname in a Terminal window. For example, if you installed Mathematica in the Applications folder, type

To quit Mathematica on any platform, type Exit[]. You will be returned to the command-line prompt.

TIP
Bullet Windows: You can run the kernel as a stand-alone application by choosing All Programs RightTriangle Mathematica 5.1 RightTriangle Mathematica 5.1 Kernel from the Start menu.

Batch files

When doing very large calculations, you may find it convenient to run Mathematica in batch mode. You can prepare a file with many lines of Mathematica input, read it into Mathematica, and save the result to another file using the command:

It is sometimes useful to make the first line in the file AppendTo[$Echo, "stdout"] so that the input lines will also be included in the output file.

Running the kernel remotely

The front end can be connected to a kernel running on a remote machine. When you run a remote kernel, remember that kernel commands involving files act on the remote computer's file system, not the local computer's file system. Mathematica 5 supports kernels from Version 3.0.1 and later.

Version 5 normally connects to other kernels using the TCP/IP MathLink device to make kernel connections. Earlier versions of Mathematica do not support TCP/IP connections. For more information, see support.wolfram.com/mathematica/mathlink.

Remote kernel connection on a trusted host

  1. Choose Kernel RightTriangle Kernel Configuration Options.
  2. In the dialog box that appears, click Add.
  3. Fill out the Kernel Name text field, which will be the name given in the list of available kernels.
  4. Specify that the kernel is on a remote machine.
  5. Give the hostname of the remote machine.
  6. Type your username for the remote machine.
  7. Click OK to close the Kernel Properties dialog box.
  8. Click OK to close the first dialog box.

To use the new kernel, go to the Kernel menu and choose the new kernel from either the Start Kernel, Default Kernel, or Notebook's Kernel submenu.

Remote kernel setup on a nontrusted host

If the remote computer does not consider your computer a trusted host, you should change the remote kernel configuration to allow you to enter your password for the remote computer.

To modify a remote kernel configuration to request entry of a password:

  1. Set up a remote kernel according to the previous instructions. In the Kernel Properties dialog box, check the box labeled "Request password when connecting".
  2. Click OK.

To use a remote kernel that requests a password:

  1. Choose the remote kernel from either the Start Kernel, Default Kernel, or Notebook's Kernel submenu.
  2. If you have selected the remote kernel as the default kernel or as the current notebook's kernel, launch it by entering an expression and pressing ShiftKeyKeyBarEnterKey. As the remote kernel is started up, a Remote Login dialog box will pop up.
  3. Enter your password for the remote machine in the Password field.
  4. Click Connect. The Remote Login dialog box will disappear.

On some computers, it may take several seconds for the Mathematica kernel to start up and produce output for your first calculation.

If a remote kernel connection fails to start up correctly, the Mathematica front end will treat that connection as idle. If you want to try opening the connection again, you should first choose Kernel RightTriangle Quit Kernel and click the name of the idle connection to close it.

TIPS
Bullet Mac OS X: Application bundles have the extension .app when viewed from the command line.
Bullet Command-line options for Unix are listed in
Troubleshooting on Unix/Linux. Command-line options for Mac OS X are listed in Troubleshooting on Mac OS X.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: