Skip to content

Creating an Initial Partitioning

diamog edited this page Jan 12, 2018 · 33 revisions

##Contents

##Design EnGPar supports creating a partition from a lower part count, s, to a larger part count, t. We will refer to this operation as splitting. The split operation can also be used to create an initial partitioning on a static part count.

##Initial Setup To run the EnGPar split routine, some specific setup must be done to get correct results. First, the application must create an MPI Communicator that contains the processes which represent the initial ranks in one group and all other ranks in a different group. Below is an example of creating this communicator. split_factor is the expansion factor to go from s parts to t parts or more simply it is equal to t/s.

  int group = rank%split_factor!=0;
  int groupRank = rank%split_factor;
  MPI_Comm_split(MPI_COMM_WORLD,group,groupRank,&newComm);

Once the communicator is setup. Each process must create an empty Ngraph:

  agi::Ngraph* g = agi::createEmptyGraph();

Then the split input structure will be created. This input takes in the Ngraph, the new communicator, old communicator, a flag which is true if the part is one of the s parts, the split_factor, and the imbalance tolerance for the graph vertices:

  engpar::Input* input_split = engpar::createSplitInput(graph,newCommunicator,oldCommunicator, isPartOfS,
                                                        split_factor, tolerance);

This call will setup the internal communicator used in EnGPar so it must be done before the next steps.

After the input is created, the graph must be constructed on each of the original s parts. The other t-s parts should not construct anything beyond the initial createEmptyGraph() call. TO construct the graph see .

##Splitting

Clone this wiki locally