LIGHTWEIGHT GRID MANAGER TUTORIAL

Configuration

The Lightweight Grid consists of a network of servers, each of which knows how to launch Mathematica kernels for parallel computation; a description of the technology is given in the "Introduction" section.

This section discusses a number of configuration topics that govern the operation of a Lightweight Grid server: the administrator password allows configuration changes to be made through the web interface, "Kernel Settings" deals with parameters of the copy of Mathematica that gets launched, and "Server Settings" deals with settings for the server.

Administrator Password

For some operations of the server, such as changing configuration or shutting down kernels, you need to enter a password that authenticates your right to carry out the operation. The server will ask you to enter the administrator password when you try to carry out one of these operations. The web interface uses a standard session-based login session, so once you authenticate you do not need to enter your password until the session expires (typically after about 30 minutes with no activity).

Note that the administrator password is used in a different way from the password of the account that runs the server. You can read more about this in the "Introduction", which has a summary of the Lightweight Grid technology.

The administrator password is typically set when you install the Lightweight Grid. It can be changed after installation.

Windows

Under Windows to reset the administrator password you should first stop the server.

If you are running Vista with User Account Control turned on, you should use the UAC Elevated Command Prompt shortcut, found in SystemFiles\RemoteServices\SystemFiles\Windows. This runs a command prompt but with administrator privileges. If UAC is not relevant, you should just run a command prompt. Alternatively, you can log in as the user account that runs the server.

After this, issue the following commands.

set INSTALLROOT=C:\Program Files\Wolfram Research\gridMathematica Server\9.0
cd %INSTALLROOT%\SystemFiles\RemoteServices\SystemFiles\Windows
.\adminutility.bat passwd admin <password>

Note that if you installed gridMathematica Server into a different location you would have to make a different setting for INSTALLROOT.

Finally, you can log out and restart the server.

Linux

In Linux the administrator password can be set as follows. First, stop the server. Then issue the following commands.

cd /usr/local/Wolfram/gridMathematicaServer/9.0
cd SystemFiles/RemoteServices/SystemFiles/Unix
sudo ./adminutility.sh passwd admin <password>

Note that if you installed gridMathematica Server into a different location than shown above, you would have to change to the corresponding directory.

Mac OS X

For Mac OS X the administrator password can be set as follows. First, stop the server. Then issue the following commands.

cd /Applications/gridMathematicaServer.app
cd SystemFiles/RemoteServices/SystemFiles/MacOSX
sudo ./adminutility.sh passwd admin <password>

Note that if you installed gridMathematica Server into a different location than shown above, you would have to change to the corresponding directory.

Data Directory

The server collects all its configuration and log files in one place, the data directory. The location of the data directory itself is configurable, but the default location is under the $UserBaseDirectory of the user that runs the service, in the subdirectory ApplicationData/WolframLightweightGridManager. The data directory has three subdirectories, conf, log, and kernel.

The conf directory holds the configuration files. General.conf is the file corresponding to the Kernel Settings tab. Agent.properties is the file corresponding to the Server Settings tab. If you create new services or rename the default service from General, then there will be one file for each service, named according to the service name with a .conf file extension. Each time you save settings, the corresponding file is updated.

The log directory holds log files useful for tracking server operation. The audit.log file corresponds to the Audit Log section of the Logging tab. The wrs.log file corresponds to the Details section of the Logging tab. The jmdns.log file contains details of the service discovery operation. Each of these log files will be renamed on a daily basis so that no single log file contains more than a day's worth of information. It is recommended to keep log files, but log files can be removed without harming server operation. It is not recommended to modify audit log files.

The kernel directory is used as the initial working directory for kernels launched by the server. This area can be used as local scratch space by user programs running on Lightweight Grid kernels.

Kernel Settings

These parameters can be modified to change details of the way that the Lightweight Grid launches Mathematica for parallel computation. They can be changed with the Services tab of the web interface.

Name

Name is the service name. To rename the service, you should modify this parameter. Each service is a group of identically configured kernels. When you install the server a default service named General is created.

Enabled

Enabled sets whether the server can launch kernels. The default is true, which allows kernels to be launched. You can set this to false, stopping kernels being launched, when you are making some lengthy configuration changes.

The LaunchEnabled server setting takes precedence over this setting; if LaunchEnabled is false, the Enabled property setting is ignored.

KernelCommand

KernelCommand gives the command that the server uses to launch the Mathematica kernel. Typically it should contain the path to the kernel executable, the -mathlink and -subkernel flags, and any other flags that are needed.

To change the location of the copy of Mathematica used by the server, you should modify this parameter.

LinkHost

LinkHost sets the name of the MathLink TCP connections that the server sends back to a master Mathematica kernel that is connecting to a parallel kernel. Typically it is chosen by default correctly, but sometimes a name is chosen that cannot be seen by the master kernel. This can happen if some special network device, such as for a virtual machine, is installed. Set this property to force the link to be named by a particular IP number such as 12.112.110.16.

FrontEndLaunchName

FrontEndLaunchName is the full name of the Mathematica notebook front end. The default is to use the name that goes with the Mathematica kernel.

FrontEndLaunchFlags

FrontEndLaunchFlags are given to the Mathematica notebook front end when it is launched. This could be used to set the name of a X display.

KernelNumber

KernelNumber sets the maximum number of kernels that the server will allow to run at any given time. The default value is 0, which means that the server will not limit the number of kernels, and these will be limited by license availability.

UnconnectedTimeout

UnconnectedTimeout sets the time in milliseconds that a kernel will wait for the master kernel to actually connect to it before terminating. A value of 0 means there is no limit, though this is not generally recommended.

KernelTimeout

KernelTimeout sets the maximum time in milliseconds that a kernel will be active. The default value is 0, which means that there is no limit. When the time period expires, the kernel is shut down.

KernelInitialization

KernelInitialization is a command that is sent to the kernel being launched. This could be used for special configuration.

Server Settings

These parameters can be modified to change details of the way that the Lightweight Grid server operates. They can be changed with the Settings tab of the web interface.

LaunchEnabled

LaunchEnabled sets whether the server can launch kernels. The default is true, which allows kernels to be launched. You can set this to false, and stop kernels being launched, when you are making some lengthy configuration changes.

Port

Port sets the port number used for constructing the contact URL that the server advertises through the service discovery mechanism. The default is 0, which means that a setting of 3737 will be used. If you have reconfigured the web server to use a different port, you would modify this property. If the ContactURL setting is used, the Port setting is ignored.

Changes to Port do not take effect until you restart the server.

ContactURL

ContactURL is the URL used by master Mathematica kernels to connect to the server to launch parallel kernels. The default value is a blank field, in which case the server constructs a contact URL automatically from the default hostname and the Port property. Sometimes the default hostname is not actually reachable across the desired networks. (This can happen on a computer with multiple network interfaces, or on a machine where the configured hostname differs from its DNS name server entry.) In this case a different name, or IP number, can be set here.

When you set this, the name must be locatable over the network, and the port must match the one used by the server. In addition, you must include the WolframRemoteServices path. A possible setting would be http://12.112.110.16:3737/WolframRemoteServices, which would refer to the server running on the machine with IP number 12.112.110.16.

Changes to ContactURL do not take effect until you restart the server.

IPFilter

IPFilter is a filter that controls access by the computers that connect to the server according to their IP numbers. The default value is no filter, which will allow any computer to connect to the server and launch kernels.

The setting for IPFilter is a comma separated list of patterns; each pattern is of the form x.x.x.x/bits, where bits is the length of a bit mask. A setting of 12.112.110.0/24 means that the first 24 bits of the IP number have to match, so IP numbers that start 12.112.110 will be allowed. A setting of 12.112.110.0/24,12.112.116.0/24 means that there are two patterns, and for both the first 24 bits have to match, allowing requests from IP numbers that start with 12.112.110 or 12.112.116. In both cases any IP numbers that do not match will not be allowed to connect to the server and launch kernels.

Note that you can also control connections at the Tomcat level, but IPFilter is a quick way to control access.

Use caution when changing this setting. It is possible to cut off access for the computer you are browsing from. If you are cut off, you can connect to the server directly with a remote login or from a computer that is accepted by the IPFilter setting.

Licensing

Mathematica needs a license so that it can be launched by the Lightweight Grid. The web interface can install a license, which is described in the "Licensing" section.

New to Mathematica? Find your learning path »
Have a question? Ask support »