(Post 25/08/2006) As distributed, OptimalGrid
is set up to run a sample problem called the Eden model. This Eden model
problem is described in detail in the next section. The default setup
will involve using two virtual processors that run on a single real processor.
Once you verify that OptimalGrid runs on a single processor, you can expand
to use any number of processors to run the same problem solution or a
different problem solution that you develop.
Các phần đã đăng:
Section 4. Installing and running OptimalGrid
Overview
As distributed, OptimalGrid is set up to run a sample
problem called the Eden model. This Eden model problem is described in
detail in the next section. The default setup will involve using two virtual
processors that run on a single real processor. Once you verify that OptimalGrid
runs on a single processor, you can expand to use any number of processors
to run the same problem solution or a different problem solution that
you develop.
These installation and invocation instructions are for
OptimalGrid Version 1.0.
Requirements
- Minimum requirements:
- One or more computers (750-MHz processor)
- Java runtime 1.3 or higher
- TSpaces (included in the distribution)
- 10-Mbit Ethernet to each processor
- Storage requirements are application-dependent
- Operating systems supported:
- Any system that supports Java technology; tested platforms include
Linux and Windows
- Recommended configuration:
- Linux
- Cluster of more than one machine (1-GHz processor)
- Java runtime 1.3 or higher with Java 3D extensions installed
- TSpaces (included in distribution)
- 100-Mbit Ethernet to each processor
- Storage requirements are application-dependent
Download the distribution package
Download the OptimalGrid distribution zip file from IBM
alphaWorks at http://www.ibm.com/alphaworks/tech/optimalgrid
Install
Unzip the file grid.zip onto your system into a directory
of your choice. The OptimalGrid project files will expand out into a grid
directory and other subdirectories.
File layout
After extracting the OptimalGrid files, under a directory
of your choice, there will be a new grid/ directory that has the structure
shown below. If, for example, you unzipped into c:\java\ on your Windows
system, then you would have:
Install required and optional components
There are some required and optional Java software products
used by OptimalGrid. The jar files for the required components are included
in the distribution, but you must obtain and install other files yourself.
- TSpaces is required. It's already included in the grid/lib/folder
as tspaces.jar
- Logging Toolkit for Java, version 2.2.1 is required. It's already
included in the grid/lib/folder as log.jar.
- XML support. JDOM Beta 9 support
for XML is required. Download and install it in the grid/lib/folder.
JDom requires the Apache xerces
support (xerces.jar and xml-apis.jar). These jar files are included
in the zip file, which you can download at www.jdom.org.
Download the latest Beta 9 version of JDOM at http://www.jdom.org/dist/binary/jdom-b9.zip.
After you download the file, copy the following jar files to the grid/lib/folder:
jdom.jar, xerces.jar, and xml-apis.jar
- Java 3D is an optional component for OptimalGrid. If you want to
use the 3D display facilities of OptimalGrid, you must obtain and
install the Sun Java 3D support at http://java.sun.com/products/java-media/3D/releases.html.
Copy the 3D jar files into grid/lib.
Start a TSpaces server
The first step in running the sample problem is to start
a TSpaces server on your processor. OptimalGrid uses TSpaces to communicate
between the main OptimalGrid problem manager and the various compute agents
that are running on other networked machines. So, we need to start up
a TSpaces Problem server that will handle the problem coordination. In
a setup with many processors, you would also have some TSpaces Edge servers
that would handle the communication of edge data between individual compute
agents. In this test, we will use the same TSpaces server as both a Problem
Server and Edge Server.
Assume that you installed OptimalGrid into c:\java on
a Windows system:
- Start a command window.
- Change current directory to the grid directory created above.
- Start a TSpaces server.
If you installed this on a UNIX system into ~/java:
- Start a command window.
- Change current directory to the grid directory created above.
- Use chmod to make the shell scripts executable.
- Start a TSpaces server.
cd ./grid
chmod +x *.sh
./ts.sh
|
Start two or more compute agents
The compute agents are the processes that actually work
on the problem. For the sample problem, we will use just two compute agents
running on the same system where you started TSpaces (localhost).
Assume that you installed OptimalGrid into c:\java on
a Windows system:
- Start a command window.
- Change current directory to the grid directory created above.
- Start two compute agents.
cd c:\java\grid
start .\ca.bat -singlehost localhost
start .\ca.bat -singlehost localhost
|
The -singlehost localhost tells them to talk to a TSpaces
server on this same host processor.
In a real problem, you might use hundreds of compute
agents, each running on a different processor. When you are running hundreds
of agents, you would obviously want to automate this process. In this
first release of the OptimalGrid middleware, you must have a cluster management
tool in order to distribute the OptimalGrid.jar file and application resources
to all nodes on their cluster.
In a forthcoming release of OptimalGrid, we will include
in the OptimalGrid package a Research Nugget technology based on OSGI
to make it easy for Grid developers to distribute, update, and manage
jar files, config files, and other resources required by any distributed
Grid application. Stay tuned to IBM alphaWorks for this exciting forthcoming
enhancement.
Start the Problem Manager
Now we will start the OptimalGrid Problem Manager. The
default configuration file is set up to have it build and run the Eden
model problem as described earlier. A dialog window will appear so that
you can change configuration parameters. For this initial run it is not
necessary, so you can click the Done button.
The OptimalGrid Problem Manager distributes the Eden
model problem to the compute agents, and monitors the network to adjust
the load on each Compute Agent.
Assume that you installed OptimalGrid into c:\java on
a Windows system:
- Start a command window.
- Change current directory to the grid directory created above.
- Start an OptimalGrid Problem Server.
cd c:\java\grid
.\grid.bat -singlehost localhost
|
After a few moments' delay, the problem should be distributed
to the ComputeAgents (via TSpaces) and the compute agents will put up
a window that displays a graphical representation of the system.
Problem termination
If everything runs smoothly, then the console session
where you started the OptimalGrid problem manager displays the message:
APM.run() Run is Finished!!
|
The final status of each Collection of OPCs has been
written to the ./log directory with filenames of OPCcCCCtIII.xml where
CCC is the collection number and III is the iteration number. These are
XML files that currently you must process yourself. However, we do plan
to develop tools in the future to make this easier.
(Copyright IBM Corporation)
|