Class MasterPI

java.lang.Object
  extended by MasterPI

public class MasterPI
extends Object

Uses many tasks to calculate PI. This is an adaptation of the cpi.c program developed using the MPI - Message-passing interface concurrent programming approach.

See Also:
http://www.open-mpi.org/, http://www.mpi-forum.org/, http://www.mcs.anl.gov/research/projects/mpi/usingmpi/examples/simplempi/cpi_c.htm

Field Summary
static int N_intervals
          Number of intervals used to calculate PI.
static int N_tasks
          Number of slaves used to calculate PI concurrently.
static Semaphore reduce
          Semaphore used to tell when all the slaves are done.
 
Constructor Summary
MasterPI()
           
 
Method Summary
static void main(String[] args)
          Main program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

N_intervals

public static final int N_intervals
Number of intervals used to calculate PI.

See Also:
Constant Field Values

N_tasks

public static final int N_tasks
Number of slaves used to calculate PI concurrently.

See Also:
Constant Field Values

reduce

public static Semaphore reduce
Semaphore used to tell when all the slaves are done.

Constructor Detail

MasterPI

public MasterPI()
Method Detail

main

public static void main(String[] args)
Main program.