next up previous contents
Next: How P++ Arrays are Up: P++ Previous: Goals of the P++

Partitioning Objects

P++, being of object-oriented design, introduces an object based control of the partitioning of the array object. Specifically we introduce a partitioning object which can be used to build P++ arrays (via a parameter to the P++ array constructor) or modify existing arrays previously built. It is a principle feature of the P++ partitioning objects that all array objects built with a given partitioning are associated with that partitioning object. Manipulation of the partitioning object effects all array objects with which it is associated. For example, specifying a new range of processors for a partitioning object repartitions the P++ array objects associated with that partitioning object. While not important for more simple single grid applications, the level of control provided by partitioning objects is intended for control (and load balancing) of applications containing many grids (e.g. adaptive mesh refinement and overlapping grid applications).

Partitioning objects are provided to allow both user and programmable control. Load balancers would use the programmable control which represents a separate interface to the partitioning objects. Users would more directly use the more simple interface for the specification of the partitioning of an array object. A++ arrays provide member functions as the means of associated an array with a particular partitioning object. This interface allows for a simplified manipulation of many partitioning objects (and thus even more P++ array objects) within a single application.

For example, an adaptive mesh refinement (AMR) grid could contain many array objects associated with each rectangular grid (there would be many rectangular grids within an AMR application) and a single partitioning object for rectangular grid. Within an adaptive mesh refinement grid many grids and thus many partitioning objects would exist. The control of the adaptive mesh refinement grid and the array objects associated with the definition of the application can thus be abstracted through the control of the partitioning objects associated with the adaptive grid.

     Partitioning_Type P;
     doubleArray A(100,100,P); // A uses the partition object P
     doubleArray B(100,100);   // B has the default partition object
     B.partition(P);           // repartitioning B consistent with P
     Range Middle_Processors (100,199);  // specify a fictitious collection of processors
     Partitioning_Type Q(Middle_Processors);  // build another partitioning object
     B.partition(Q);           // B is repartitioned onto the middle 100 processors

The example above builds a partitioning object, P, which has the default partitioning (across all processors and partitioned along each axis). The array A is built to have a partitioning across the processors specified by P. The array, B, is build with the default partitioning and then repartitioned to be consistent with the partitioning specified by P (since P, in this case, represented the default partitioning the distribution of B is unchanged). The partitioning Q is build over the processor 100 through 199, and B is repartitioned onto that smaller collection of processors.


next up previous contents
Next: How P++ Arrays are Up: P++ Previous: Goals of the P++
Dan Quinlan
2000-08-16