com.nukernel.jdcf
Interface Program

All Known Implementing Classes:
AbstractProgram

public interface Program
extends java.lang.Runnable, java.io.Serializable

Functions that all parallel programs must implement. After a job is submitted, the following happens:

  1. initJob---run on the machine coordinating the startup of the job; not guaranteed to be a node involved in the computation.
  2. the Job objects gets sent out to the compute nodes.
  3. getCommunicator---should allocated an object and return it. This method should not be expect to be able to print, access files, etc.
  4. initSys---run to perform internal initialisation.
  5. initNode---perform any initialisation needed on the node before the job starts running.
  6. run---run the job.


Method Summary
 Communicator getCommunicator()
          Allocate and return an object for use in communicating between nodes and to inject control into the system from external sources.
 void initJob()
          Perform any global initialisation needed by the program.
 void initNode(java.lang.String[] args)
          Perform node-specific initialisation prior to actually starting the program on that node.
 void initSys(Cluster cluster)
          Perform system-specific initialisation prior to running any other code on the compute node.
 void kill()
          Permanently stop executing a job.
 java.lang.String name()
          Get the name of the program.
 void resume()
          Resume executing a previously suspended job.
 void run()
          Begin executing the job.
 void suspend()
          Temporarily halt execution of the job.
 

Method Detail

name

public java.lang.String name()
Get the name of the program.
Returns:
name of the program

initJob

public void initJob()
Perform any global initialisation needed by the program. This method is not guaranteed to run on a compute node used in running the job.

initSys

public void initSys(Cluster cluster)
Perform system-specific initialisation prior to running any other code on the compute node.
Parameters:
cluster - a Cluster object

initNode

public void initNode(java.lang.String[] args)
Perform node-specific initialisation prior to actually starting the program on that node.
Parameters:
args - the argument list passed to the job by the front end

getCommunicator

public Communicator getCommunicator()
Allocate and return an object for use in communicating between nodes and to inject control into the system from external sources.
Returns:
a remote object for communication

run

public void run()
Begin executing the job.
Specified by:
run in interface java.lang.Runnable

suspend

public void suspend()
Temporarily halt execution of the job.

resume

public void resume()
Resume executing a previously suspended job.

kill

public void kill()
Permanently stop executing a job. The job's run method should exit.

Java Distributed
Computational
Framework v0.1

Copyright © 2000 Sidney Cammeresi. All rights reserved.