The HPJava Project


HPJava Home Page
HPspmd lectures
mpiJava
HPJava language

PCRC Home Page

NPAC Home Page



Java Grande Home

Subgroups

A subgroup is some slice of a process grid, formed by restricting the process coordinates in one or more dimensions to single values.

It is quite natural and convenient to express this restriction procedure in terms of a location. If i is a location in a range distributed over a dimension of p, then

  p / i
represents a subgroup of p - the slice of p to which location i is mapped. It is a subgrid with one dimension removed. In the illustration below p is a 2 by 3 process grid with ranges x and y distributed over its dimensions.

Although the language overloads the / operator on groups to make expressions like p / i legal, it is fairly unusual to see an expression like this appearing explicitly in an HPJava program. Their main role is in defining the semantics of the language. The distributed control constructs overall and at change the active process group in a way that has not been precisely specified so far. Assume the current active process group is p, and x is distributed over a dimension of p. Inside either of the constructs

  at(i = x [n]) {
    ...
  }
or
  overall(i = x) {
    ...
  }
the active process group is reduced to p / i. The effect of the on construct on the APG was defined in earlier sections. Together with new rules given here, we have a complete prescription for computing the APG at any point in an HPJava program.

Subgroups can also be used to describe the home group of an arbitrary array element. Recall that for variables other than array elements the home group was defined to be the APG in effect at the time the variable was declared or constructed. For an array element, if the distribution group of the array as a whole (specified implicitly or explicitly in the array constructor) is p, and the array subscripts include locations i, j, ..., the home group of the element is

  p / i / j / ...
Next: Subranges

Bryan Carpenter, (dbc@npac.syr.edu). Last updated January 2000.