Introduction to the Wolfram Lightweight Grid System
- Identify and use computers with specific features, for example, "find a computer with at least 2GB RAM running Linux"
The Lightweight Grid has both client and server components. The client component is described in this guide. It provides functions for starting and managing parallel kernels in Mathematica and for coordinating remote or parallel computations. The server component, called a manager, runs in a web server, installed on the grid computers where worker kernels will run. The server component has a web interface for kernel management and configuration.
In order for Mathematica to launch a kernel on a remote computer with the Lightweight Grid, Server with the Lightweight Grid Manager must be installed on the remote computer. The Server installer asks if you want to install the Lightweight Grid Manager. (The terms "agent", "service", and "daemon" are commonly used in networking software to refer to a program that runs all the time and may be started when the computer boots in order to provide some service initiated by requests coming over the network.)
This section describes how to quickly start using the Lightweight Grid with the Parallel Tools.
Continue with your parallel computing. When you want to shut down the kernels, call CloseKernels:
There are many places in the Lightweight Grid system where you need to identify a the Lightweight Grid manager running on a particular computer. This section describes the different ways to identify an agent.
The canonical way to identify a the Lightweight Grid manager, which is a web application running within a web server, is by using its published contact URL. Each of the shorter specifications takes advantage of the DNS Service Discovery (DNS-SD) directory to narrow down which agent is intended, or is used to build a URL assuming the agent uses defaults for the URL components not specified. An agent that does not use default values and is not known to DNS-SD cannot be referred to by any short form.
The simple hostname is the first label of a fully qualified domain name, before the first dot. For example, galaxy is the hostname obtained from the fully qualified domain name galaxy.example.com. This form can be used if either of the following is true: (1) the agent has been found by DNS-SD, the hostname is unique, and there is only one agent running on that host, or (2) the agent is contactable using the default values for the components of its URL (port number, context path, and servlet name).
This form can be used if either of the following is true: (1) the agent has been found by DNS-SD and there is only one agent running on that host, or (2) the agent is contactable using the default values for the components of its URL (port number, context path, and servlet name).
This form can be used if either of the following is true: (1) the agent has been found by DNS-SD and there is an agent matching the given host and port, or (2) the agent uses default values for the context path and servlet name.
This does not have to be the same as the canonical URL, the one published by the agent through DNS-SD as the URL to use in contacting it, as long as the agent is reachable by ordinary network connectivity mechanisms.
For agent specifications 1 through 3, the Lightweight Grid will use the given hostname and optional port number to index its list of known agents. If a unique match is found, the published contact URL for the matching agent will be used to contact it. If no match is found, a contact URL will be constructed using default values. It is an error if multiple agents match the given specification. This could happen, for example, when a hostname such as galaxy is used when the same hostname exists in more than one domain, such as galaxy.example.com and galaxy.example.edu.
The Lightweight Grid manager has one or more services. A service is a set of configuration properties, such as the command for launching the kernel. The agent always has one service designated as the default service, initially named General. Functions that can take a service as an argument, such as RemoteKernelOpen, will use the default service if no service is specified.
One significant use of the service feature is to provide support for more than one version of Mathematica. For example, if you have installed Mathematica 7.0 and 8.0, Remote Services can launch either of these versions by associating a different service with each one.
In general, if you find that you have different service configuration needs, you should consider creating new services to match your different configuration needs rather than repeatedly reconfiguring the default service.