Using P3

last-updated: September 5, 2004
This page provides a quick start guide of P3 and you can experience P3 by following steps.

Table of Contents

Prerequisites and Notice

Number of computers

You need 3 or more computers on a LAN / subnet, on which all computers can receive broadcast traffic from other computers.

Multiple instances of P3 Hosts and Controllers can run on one computer with an appropriate configuration of JXTA.

Limited use cases

Configure JXTA

On the first start-up of Host and Controller, The "JXTA Configurator" window appears up (Fig. 1). P3 uses JXTA as the communication library and it requires a proper configuration along users' usage and environment.


Fig. 1: JXTA Configurator window

  1. On the [Basic settings] panel, which is the default panel shown up first, put an arbitrary peer name on the [Peer Name] text box. Note that this peer name is only an identifier for the human, not for computers and multiple computers can have the same peer name.
  2. Click the [Advanced] button on the panel. The [Experienced Users Only] panel appears (Fig. 2).

    Fig. 2: Experienced Users Only panel
    The first [Enabled] checkbox in "HTTP Settings" area is checked (enabled). Click this checkbox and disable it.
  3. Click the [OK] button on the lower part of the window.

Now you completed JXTA configuration. JXTA Configurator window does not appear on the next start-up and later. The configuration was stored into the .jxta/ directory and you can clear all configuration and cached information JXTA holds by removing the .jxta/ directory.

Start Hosts

Host is the daemon program which collectively hosts P3 parallel processing applications. A resource provider (PC contributor) runs this daemon program on their PCs.

On 2 or more computers, start Hosts. In this guide, one of them will work as the master of master-worker style distributed computation and others are workers.

On UNIX-like OS:
<somewhere>/megacomp/bin/mc-host.sh
On Windows:
<somewhere>\megacomp\bin\mc-host.bat
The <somewhere> is the directory where you install P3 into.

A Host window appears up (Fig. 3).


Fig. 3: Host window

Start Controller

Controller is the tool to submit computational jobs to Hosts and control the jobs. A resource user (PC user) uses this tool.

On a computer which does not run a Host, start a Controller.

On UNIX-like OS:
<somewhere>/megacomp/bin/mc-controller.sh
On Windows:
<somewhere>\megacomp\bin\mc-controller.bat
The <somewhere> is the directory where you install P3 into.

A Controller window appears up (Fig. 4).


Fig. 4: Controller window

Submit Job with Controller

Submit a job using the Controller. You first create a Job Group (implemented as a peer group of JXTA) and submit JAR files representing an application program.

  1. Click the [File] menu on the top-left part of the Controller window.
    Choose the [Group] submenu.
    Click the [Create Job Group] item on the pop-up menu.

  2. Fig. 5: Create Job Group
  3. A [Job Group Name] dialog appears (Fig. 6). Type an arbitrary job name and click the [OK] button. We assume that you type "rc5 attack" here.

  4. Fig. 6: Job Group Name dialog.
  5. You see the job name you typed in the left-side pane (Fig. 7). In a short time, Hosts notice that the Job Group was created and the name is shown on the Host windows.

  6. Fig. 7: A Job Group was created.
  7. Click the job name ("rc5 attack") with the right button.
    Click the [Join Job Group] item with the left button on the pop-up menu (Fig. 8).

  8. Fig. 8: Join Job Group.
  9. Once the Controller joined the Job Group, "Peers" and "Files" lines appear on the left-side pane (Fig. 9).

  10. Fig. 9: Controller after joined Job Group.
  11. Click the job name ("rc5 attack") with the right button.
    Click the [Submit File] item with the left button (Fig. 10).

  12. Fig. 10: Choose [Submit File] item.
  13. File dialog appears (Fig. 11).
    Submit the <somewhere>/megacomp/dist/app/rc5attack.jar file by choosing the file and click the [OK] button.
    This JAR file representing an application program which implements RC5 encryption key search.

  14. Fig. 11: File dialog.
  15. You can see the name of the submitted JAR file (rc5attack.jar) by double-clicking the "Files" line on the left-side pane (Fig. 12).

  16. Fig. 11: A JAR file rc5attack.jar submitted.

Join Job Group

Hosts join a discovered Job Group to participate in the job which the Job Group represents. The Host in a Job Group is under control of the Controller which has submitted the job.

  1. Confirm that the name of the submitted Job Group is shown on upper part of the Host window (Fig. 12). If the name is not shown, wait for some time to see it.

  2. Fig. 12: Job Group name on Host window.
  3. Click the job name ("rc5 attack") with the right button.
    Click the [Join Job Group] item with the left button on the pop-up menu (Fig. 13).
    The data and the time are shown on the right column of the job name.

  4. Fig. 13: Join Job Group.
  5. On all Hosts you started, do the joining operation as written above.

Start Job

Now a Controller and all Hosts are prepared to run a job. You can control the job using the Controller.

  1. On the Controller window, double-click the "Peers" line on the left-side pane. All peers (Controller and Hosts) are listed under the "Peers" line (Fig. 14).
    If a peer remains having a not-green icon, wait until all peers have green icons.

  2. Fig. 14: Peers (Controller and Hosts) in Job Group.
  3. Click the JAR filename ("rc5attack.jar") with the right button and you see the job operation menu (Fig. 15). Click the [Start Application] item with the left button and the Controller send job start messages to all Hosts.

  4. Fig. 15: Job operation menu.
  5. All Hosts in the Job Group receive the job start message and start the job. Once the job starts, the icon on the left of the job name ("rc5 attack") becomes red from orange.
  6. Lower part of a Host window shows output from the job (Fig. 16).

  7. Fig. 16: Job output.

Stop Job

You can stop the job while it running. You also have to stop the job to re-start it.

  1. On the Controller window, Click the JAR filename ("rc5attack.jar") with the right button and you see the job operation menu (Fig. 15). Click the [Stop Application] item with the left button and the Controller send job stop messages to all Hosts.

Stop Controller and Hosts

To stop Controller and Hosts, click the [File] menu on the top-left part of the window and choose the [Quit] item in the menu.
Return to Documents page
Return to P3 main page