Installation and Use

By: James Reynolds - Revised: 2006-05-24 devin

Introduction

Learn how to install Xgrid, how to set up an agent, controller, and client, and how to run an Xgrid job.


Installing Xgrid

First, run the Xgrid installer. You can run it using the GUI, or you can install it from the command line (there are instructions provided with Xgrid explaining how to do this). It will install these notable files:

    /Applications/Apple/Xgrid BLAST.app
    /Applications/Apple/Xgrid.app
    /Library/Application Support/Xgrid
    /Library/PreferencePanes/Xgrid.prefPane
    /Library/Preferences/com.apple.xgrid.agent.plist
    /Library/Preferences/com.apple.xgrid.controller.plist
    /Library/Screen Savers/Xgrid.saver
    /Library/StartupItems/GridAgent
    /Library/StartupItems/GridServer
    /Library/Xgrid
    /Library/Xgrid/Agent
    /Library/Xgrid/Datasets
    /Library/Xgrid/Documentation
    /Library/Xgrid/Frameworks
    /Library/Xgrid/Frameworks/BEEP.framework
    /Library/Xgrid/Frameworks/GridPlugs.framework
    /Library/Xgrid/Plug-ins
    /Library/Xgrid/Plug-ins/Create Custom Plug-in.xgplug
    /Library/Xgrid/Plug-ins/Factor.xgplug
    /Library/Xgrid/Plug-ins/Mandelbrot.xgplug
    /Library/Xgrid/Plug-ins/Shell.xgplug
    /Library/Xgrid/Plug-ins/Xfeed.xgplug
    /Library/Xgrid/Scripts
    /Library/Xgrid/Scripts/XgridUninstall.command
    /Library/Xgrid/Scripts/agent_off
    /Library/Xgrid/Scripts/agent_on
    /Library/Xgrid/Scripts/agent_start
    /Library/Xgrid/Scripts/agent_stop
    /Library/Xgrid/Scripts/server_off
    /Library/Xgrid/Scripts/server_on
    /Library/Xgrid/Scripts/server_start
    /Library/Xgrid/Scripts/server_stop
    /Library/Xgrid/Server
    /Library/Xgrid/Server/GridServer

Setting up an Agent

After you have installed Xgrid, follow these steps:
  • Open System preferences, Xgrid prefpane, Agent tab.
  • Tell it where to look for a controller (Rendezvous or IP).
  • Specify when to be available. Either always (dedicated node) or when idle, which is after 15 minutes of inactivity or when the dedicated Xgrid screensaver displays. The Xgrid screensaver has to be selected in the Screensaver prefpane, it isn't automatically selected. If you have idle selected, you probably want "Suspend tasks" also.
  • Set up password in "Agent Security" tab.
  • Click the "Start" button.
The setting files can be copied to as many machines as you want so that you do not have to configure each one by hand. Of course the first one will need to be set up by hand if you want a password. These are the files that get modified:

    /Library/Preferences/com.apple.xgrid.agent.plist
    /Library/Xgrid/Agent/controller-password
    /private/etc/hostconfig



Setting up a Controller

After you have installed Xgrid, follow these steps:
  • Open System preferences, Xgrid prefpane, Controller tab.
  • Enter password to give to agents.
  • Enter password required for clients in "Controller Security" tab.
  • Click the "Start" button.



Setting up a Client

After you have installed Xgrid, follow these steps:
  • On a computer, any computer, aka the "client", open /Applications/Xgrid.app or /Applications/Xgrid BLAST.app.
  • Tell it what controller to connect to. All the controllers on your subnet will appear in a popup list. Or you can specify an IP.
  • Enter password


To use Xgrid BLAST.app you will have to install the BLAST command-line tool and a BLAST database on the agents.


If you launched Xgrid.app, you will be asked to launch a new job. Your initial list is:
  • Factor
  • Mandelbrot
  • Shell
  • Xfeed
  • Custom Plug-in


Running Xgrid Jobs

Mandelbrot - This plug-in cycles through the Mandelbrot set, makes some really pretty pictures and is really good for a demo tool. It also demonstrates how to divide up a single job into 9 parts. The calculation uses a slow algorithm, so it is good to show as a demo of parallelization.


Shell
- This plug-in allows you to run a shell command on one computer. It exists so that you can check to make sure the controller is working. The source code is available also, so you can get an idea how to create plug-ins.


Factor - This plug-in factors numbers of this form: 2^exp + mod.

Xfeed - This plug-in a prebuilt Custom Plug-in (see below). Its job is similar to the shell plug-in, but it will run it on multiple computers.

Create Custom Plug-in - This is the interesting plug-in. See the next section.