Projects Main Page‎ > ‎Compiled MPI‎ > ‎

Compiler Analyses and Transformations

Communication Structure Analysis:

We are developing a compiler analysis infrastructure to statically match MPI send and receive operations. The analysis abstracts the behaviors of an unbounded number of processes into a few equivalence classes and uses symbolic inference to connect matching send and receive expressions. This analysis will be used to reduce the cost of receive matching and to detect collective communication patterns and replace them with implementations optimized for the target platform.


Send-Receive Fusion:

If a send and receive operation are executed in the same shared memory domain, their data packing and unpacking code can be fused so that data is copied directly from the sender’s to the receiver’s data structure. We are developing a compiler analysis to perform this fusion.

Original Code

Transformed Code

for(i=0; i<numAtoms; i++)
   if(borderAtom(i)) {
      buf[len] = atoms[i];
      len++;
      totalAtoms--;
   }
MPI_Send(buf, len);             

MPI_Recv(buf, status);

MPI_Get_count(status, &len)

for(j=0; j<len; j++) {

   atoms[totalAtoms] = buf[j];

   totalAtoms++;

}

for(i=0; i<numAtoms; i++)
   if(borderAtom(i)) {
      remote->atoms[remote->totalAtoms] = atoms[i];

      remote->totalAtoms++;
      len++;
      totalAtoms--;
   }

Comments