76            int *interiorNodes, 
int *bdryNodes,
 
   77            int *interiorCount, 
int *bdryCount);
 
   79              void *
A, 
int *interiorNodes,
 
   80              int *bdryNodes, 
int *interiorCount,
 
   91 #define __FUNC__ "SubdomainGraph_dhCreate" 
  125 #define __FUNC__ "SubdomainGraph_dhDestroy" 
  216 #define __FUNC__ "SubdomainGraph_dhInit" 
  225   if (
np_dh == 1 || blocks > 1)
 
  243 #define __FUNC__ "SubdomainGraph_dhFindOwner" 
  256   for (sd = 0; sd < 
blocks; ++sd)
 
  258       if (idx >= beg_row[sd] && idx < beg_row[sd] + row_count[sd])
 
  268       fprintf (stderr, 
"@@@ failed to find owner for idx = %i @@@\n", idx);
 
  269       fprintf (stderr, 
"blocks= %i\n", blocks);
 
  271       sprintf (
msgBuf_dh, 
"failed to find owner for idx = %i", idx);
 
  279 #define __FUNC__ "SubdomainGraph_dhPrintStatsLong" 
  284   double max = 0, 
min = INT_MAX;
 
  287      "\n------------- SubdomainGraph_dhPrintStatsLong -----------\n");
 
  288   fprintf (fp, 
"colors used     = %i\n", s->
colors);
 
  289   fprintf (fp, 
"subdomain count = %i\n", s->
blocks);
 
  292   fprintf (fp, 
"\ninterior/boundary node ratios:\n");
 
  294   for (i = 0; i < s->
blocks; ++i)
 
  306     ratio = (double) inNodes / (
double) bdNodes;
 
  309       max = 
MAX (max, ratio);
 
  312          "   P_%i: first= %3i  rowCount= %3i  interior= %3i  bdry= %3i  ratio= %0.1f\n",
 
  318   fprintf (fp, 
"\nmax interior/bdry ratio = %.1f\n", max);
 
  319   fprintf (fp, 
"min interior/bdry ratio = %.1f\n", 
min);
 
  327       fprintf (fp, 
"\nunpermuted subdomain graph: \n");
 
  328       for (i = 0; i < s->
blocks; ++i)
 
  330     fprintf (fp, 
"%i :: ", i);
 
  331     for (j = s->
ptrs[i]; j < s->
ptrs[i + 1]; ++j)
 
  333         fprintf (fp, 
"%i  ", s->
adj[j]);
 
  343   fprintf (fp, 
"\no2n subdomain permutation:\n");
 
  344   for (i = 0; i < s->
blocks; ++i)
 
  346       fprintf (fp, 
"  %i %i\n", i, s->
o2n_sub[i]);
 
  356       fprintf (fp, 
"\nlocal n2o_row permutation:\n   ");
 
  359     fprintf (fp, 
"%i ", s->
n2o_row[i]);
 
  366       fprintf (fp, 
"\nlocal o2n_col permutation:\n   ");
 
  369     fprintf (fp, 
"%i ", s->
o2n_col[i]);
 
  379       fprintf (fp, 
"\nlocal n2o_row permutation:\n");
 
  380       fprintf (fp, 
"--------------------------\n");
 
  381       for (k = 0; k < s->
blocks; ++k)
 
  386     for (i = beg_row; i < end_row; ++i)
 
  388         fprintf (fp, 
"%i ", s->
n2o_row[i]);
 
  396       fprintf (fp, 
"\nlocal o2n_col permutation:\n");
 
  397       fprintf (fp, 
"--------------------------\n");
 
  398       for (k = 0; k < s->
blocks; ++k)
 
  403     for (i = beg_row; i < end_row; ++i)
 
  405         fprintf (fp, 
"%i ", s->
o2n_col[i]);
 
  416 #define __FUNC__ "init_seq_private" 
  450     if (rpp * blocks < m)
 
  454     for (i = 1; i < 
blocks; ++i)
 
  456     for (i = 0; i < 
blocks; ++i)
 
  458     s->
row_count[blocks - 1] = m - rpp * (blocks - 1);
 
  487       for (i = 0; i < 
m; ++i)
 
  512     printf_dh (
"subdomain coloring and reordering is OFF\n");
 
  513     for (i = 0; i < 
blocks; ++i)
 
  522     SET_INFO (
"subdomain coloring and reordering is ON");
 
  532       for (i = 0; i < 
blocks; ++i)
 
  574 #define __FUNC__ "partition_metis_private" 
  584 #define __FUNC__ "allocate_storage_private" 
  629 #define __FUNC__ "init_mpi_private" 
  668       MPI_Allgather (&beg_row, 1, MPI_INT, s->
beg_row, 1, MPI_INT, 
comm_dh);
 
  711       int *interiorNodes, *bdryNodes;
 
  712       int interiorCount, bdryCount;
 
  716       interiorNodes = (
int *) 
MALLOC_DH (m * 
sizeof (
int));
 
  718       bdryNodes = (
int *) 
MALLOC_DH (m * 
sizeof (
int));
 
  727                interiorNodes, bdryNodes,
 
  728                &interiorCount, &bdryCount);
 
  734            interiorNodes, bdryNodes,
 
  735            &interiorCount, &bdryCount);
 
  740       MPI_Allgather (&bdryCount, 1, MPI_INT, s->
bdry_count, 1, MPI_INT,
 
  745       for (i = 0; i < interiorCount; ++i)
 
  747     o2n[interiorNodes[i]] = idx++;
 
  749       for (i = 0; i < bdryCount; ++i)
 
  751     o2n[bdryNodes[i]] = idx++;
 
  770       for (i = 0; i < 
m; ++i)
 
  795     printf_dh (
"subdomain coloring and reordering is OFF\n");
 
  796     for (i = 0; i < 
blocks; ++i)
 
  805     SET_INFO (
"subdomain coloring and reordering is ON");
 
  842 #define __FUNC__ "SubdomainGraph_dhExchangePerms" 
  846   START_FUNC_DH MPI_Request * recv_req = NULL, *send_req = NULL;
 
  847   MPI_Status *status = NULL;
 
  849   int i, j, *sendBuf = NULL, *recvBuf = NULL, *naborIdx = NULL, nz;
 
  856   int myFirstBdry = m - myBdryCount;
 
  866   sendBuf = (
int *) 
MALLOC_DH (2 * myBdryCount * 
sizeof (
int));
 
  873          "\nSUBG myFirstBdry= %i  myBdryCount= %i  m= %i  beg_rowP= %i\n",
 
  874          1 + myFirstBdry, myBdryCount, m, 1 + beg_rowP);
 
  878   for (i = myFirstBdry, j = 0; j < myBdryCount; ++i, ++j)
 
  880       sendBuf[2 * j] = n2o_row[i] + 
beg_row;
 
  886       fprintf (
logFile, 
"\nSUBG SEND_BUF:\n");
 
  887       for (i = myFirstBdry, j = 0; j < myBdryCount; ++i, ++j)
 
  889     fprintf (
logFile, 
"SUBG  %i, %i\n", 1 + sendBuf[2 * j],
 
  890        1 + sendBuf[2 * j + 1]);
 
  899   naborIdx = (
int *) 
MALLOC_DH ((1 + naborCount) * 
sizeof (int));
 
  903   for (i = 0; i < naborCount; ++i)
 
  905       nz += (2 * bdryNodeCounts[nabors[i]]);
 
  906       naborIdx[i + 1] = nz;
 
  910   recvBuf = (
int *) 
MALLOC_DH (nz * 
sizeof (
int));
 
  917   recv_req = (MPI_Request *) 
MALLOC_DH (naborCount * 
sizeof (MPI_Request));
 
  919   send_req = (MPI_Request *) 
MALLOC_DH (naborCount * 
sizeof (MPI_Request));
 
  921   status = (MPI_Status *) 
MALLOC_DH (naborCount * 
sizeof (MPI_Status));
 
  924   for (i = 0; i < naborCount; ++i)
 
  926       int nabr = nabors[i];
 
  927       int *buf = recvBuf + naborIdx[i];
 
  928       int ct = 2 * bdryNodeCounts[nabr];
 
  931       MPI_Isend (sendBuf, 2 * myBdryCount, MPI_INT, nabr, 444, 
comm_dh,
 
  936     fprintf (
logFile, 
"SUBG   sending %i elts to %i\n", 2 * myBdryCount,
 
  941       MPI_Irecv (buf, ct, MPI_INT, nabr, 444, 
comm_dh, &(recv_req[i]));
 
  945     fprintf (
logFile, 
"SUBG  receiving %i elts from %i\n", ct, nabr);
 
  950   MPI_Waitall (naborCount, send_req, status);
 
  951   MPI_Waitall (naborCount, recv_req, status);
 
  961   for (i = 0; i < nz; i += 2)
 
  963       int old = recvBuf[i];
 
  964       int new = recvBuf[i + 1];
 
  968     fprintf (
logFile, 
"SUBG  i= %i  old= %i  new= %i\n", i, old + 1,
 
  985   if (naborIdx != NULL)
 
  995   if (recv_req != NULL)
 
 1000   if (send_req != NULL)
 
 1016 #define __FUNC__ "form_subdomaingraph_mpi_private" 
 1023   MPI_Request *recvReqs = NULL, sendReq;
 
 1024   MPI_Status *statuses = NULL, status;
 
 1032   MPI_Gather (&nct, 1, MPI_INT, idxAll, 1, MPI_INT, 0, 
comm_dh);
 
 1038       for (i = 0; i < 
np_dh; ++i)
 
 1041   MPI_Bcast (&nz, 1, MPI_INT, 0, 
comm_dh);
 
 1052       recvReqs = (MPI_Request *) 
MALLOC_DH (
np_dh * 
sizeof (MPI_Request));
 
 1054       statuses = (MPI_Status *) 
MALLOC_DH (
np_dh * 
sizeof (MPI_Status));
 
 1059       for (j = 0; j < 
np_dh; ++j)
 
 1060   ptrs[j + 1] = ptrs[j] + idxAll[j];
 
 1063       for (j = 0; j < 
np_dh; ++j)
 
 1067     MPI_Irecv (adj + ptrs[j], ct, MPI_INT, j, 42, 
comm_dh,
 
 1073   MPI_Isend (nabors, nct, MPI_INT, 0, 42, 
comm_dh, &sendReq);
 
 1078       MPI_Waitall (
np_dh, recvReqs, statuses);
 
 1080   MPI_Wait (&sendReq, &status);
 
 1084   MPI_Bcast (adj, nz, MPI_INT, 0, 
comm_dh);
 
 1091   if (recvReqs != NULL)
 
 1096   if (statuses != NULL)
 
 1108 #define __FUNC__ "form_subdomaingraph_seq_private" 
 1113   int *cval, len, *
adj;
 
 1121   adj = s->
adj = (
int *) 
MALLOC_DH (blocks * blocks * 
sizeof (
int));
 
 1124   dense = (
int *) 
MALLOC_DH (blocks * blocks * 
sizeof (
int));
 
 1126   for (i = 0; i < blocks * 
blocks; ++i)
 
 1130   for (i = 0; i < 
blocks; ++i)
 
 1133       int end_row = beg_row + s->
row_count[i];
 
 1135       for (row = beg_row; row < end_row; ++row)
 
 1139     for (j = 0; j < len; ++j)
 
 1142         if (col < beg_row || col >= end_row)
 
 1146       dense[i * blocks + owner] = 1;
 
 1147       dense[owner * blocks + i] = 1;
 
 1159   for (i = 0; i < 
blocks; ++i)
 
 1161       for (j = 0; j < 
blocks; ++j)
 
 1163     if (dense[i * blocks + j])
 
 1177 #define __FUNC__ "find_all_neighbors_sym_private" 
 1182   int row, len, *cval, ct = 0;
 
 1185   marker = (
int *) 
MALLOC_DH (m * 
sizeof (
int));
 
 1187   for (i = 0; i < 
m; ++i)
 
 1191     (
"finding nabors in subdomain graph for structurally symmetric matrix");
 
 1192   SET_INFO (
"(if this isn't what you want, use '-sym 0' switch)");
 
 1197   for (row = beg_row; row < end_row; ++row)
 
 1201       for (j = 0; j < len; ++j)
 
 1204     if (col < beg_row || col >= end_row)
 
 1211       nabors[ct++] = owner;
 
 1230 #define __FUNC__ "find_all_neighbors_unsym_private" 
 1236   int *cval, len, idx = 0;
 
 1237   int nz, *nabors = s->
allNabors, *myNabors;
 
 1243   for (i = 0; i < 
np_dh; ++i)
 
 1247     (
"finding nabors in subdomain graph for structurally unsymmetric matrix");
 
 1258   for (row = beg_row; row < end_row; ++row)
 
 1262       for (j = 0; j < len; ++j)
 
 1266     if (col < beg_row || col >= end_row)
 
 1276       myNabors[idx++] = owner;
 
 1307   MPI_Alltoall (marker, 1, MPI_INT, nabors, 1, MPI_INT, 
comm_dh);
 
 1311   for (i = 0; i < idx; ++i)
 
 1312     nabors[myNabors[i]] = 1;
 
 1325   for (i = 0; i < 
np_dh; ++i)
 
 1331   memcpy (nabors, myNabors, nz * 
sizeof (
int));
 
 1338   if (myNabors != NULL)
 
 1348 #define __FUNC__ "find_bdry_nodes_sym_private" 
 1351            int *interiorNodes, 
int *bdryNodes,
 
 1352            int *interiorCount, 
int *bdryCount)
 
 1356   int row, inCt = 0, bdCt = 0;
 
 1362   for (row = beg_row; row < end_row; ++row)
 
 1364       bool isBdry = 
false;
 
 1369       for (j = 0; j < len; ++j)
 
 1372     if (col < beg_row || col >= end_row)
 
 1383     bdryNodes[bdCt++] = row - 
beg_row;
 
 1387     interiorNodes[inCt++] = row - 
beg_row;
 
 1391   *interiorCount = inCt;
 
 1396 #define BDRY_NODE_TAG 42 
 1399 #define __FUNC__ "find_bdry_nodes_unsym_private" 
 1402              int *interiorNodes, 
int *boundaryNodes,
 
 1403              int *interiorCount, 
int *bdryCount)
 
 1410   int *rpIN = NULL, *rpOUT = NULL;
 
 1411   int *sendBuf, *recvBuf;
 
 1412   int *marker, inCt, bdCt;
 
 1415   MPI_Request *sendReq, *recvReq;
 
 1426   for (row = beg_row; row < end_row; ++row)
 
 1428       bool isBdry = 
false;
 
 1433       for (j = 0; j < len; ++j)
 
 1436     if (col < beg_row || col >= end_row)
 
 1465   for (i = 0; i < 
np_dh; ++i)
 
 1472   for (i = 0; i < count;  )
 
 1483       while ((i < count) && (list[i] < last))
 
 1487       sendBuf[owner] = rpOUT[sendCt] - rpOUT[sendCt - 1];
 
 1495   MPI_Alltoall (sendBuf, 1, MPI_INT, recvBuf, 1, MPI_INT, 
comm_dh);
 
 1504   rpIN = (
int *) 
MALLOC_DH ((np_dh + 1) * 
sizeof (int));
 
 1509   for (i = 0; i < 
np_dh; ++i)
 
 1518   bdryNodes = (
int *) 
MALLOC_DH (nz * 
sizeof (
int));
 
 1520   sendReq = (MPI_Request *) 
MALLOC_DH (sendCt * 
sizeof (MPI_Request));
 
 1522   recvReq = (MPI_Request *) 
MALLOC_DH (recvCt * 
sizeof (MPI_Request));
 
 1524   max = 
MAX (sendCt, recvCt);
 
 1525   status = (MPI_Status *) 
MALLOC_DH (max * 
sizeof (MPI_Status));
 
 1530   for (i = 0; i < 
np_dh; ++i)
 
 1534     MPI_Irecv (bdryNodes + rpIN[j], recvBuf[i], MPI_INT,
 
 1542   for (i = 0; i < 
np_dh; ++i)
 
 1546     MPI_Isend (list + rpOUT[j], sendBuf[i], MPI_INT,
 
 1553   MPI_Waitall (sendCt, sendReq, status);
 
 1554   MPI_Waitall (recvCt, recvReq, status);
 
 1557   for (i = 0; i < nz; ++i)
 
 1558     bdryNodes[i] -= beg_row;
 
 1564   marker = (
int *) 
MALLOC_DH (m * 
sizeof (
int));
 
 1566   for (i = 0; i < 
m; ++i)
 
 1568   for (i = 0; i < nz; ++i)
 
 1569     marker[bdryNodes[i]] = 1;
 
 1572   for (i = 0; i < 
m; ++i)
 
 1576     boundaryNodes[bdCt++] = i;
 
 1580     interiorNodes[inCt++] = i;
 
 1583   *interiorCount = inCt;
 
 1601   if (sendBuf != NULL)
 
 1606   if (recvBuf != NULL)
 
 1611   if (bdryNodes != NULL)
 
 1621   if (sendReq != NULL)
 
 1626   if (recvReq != NULL)
 
 1640 #define __FUNC__ "find_ordered_neighbors_private" 
 1647   int loCt = 0, hiCt = 0;
 
 1649   int i, myNewId = o2n[
myid_dh];
 
 1653       int nabor = allNabors[i];
 
 1654       if (o2n[nabor] < myNewId)
 
 1656     loNabors[loCt++] = nabor;
 
 1660     hiNabors[hiCt++] = nabor;
 
 1670 #define __FUNC__ "color_subdomain_graph_private" 
 1675   int *rp = s->
ptrs, *cval = s->
adj;
 
 1676   int j, *marker, thisNodesColor, *colorCounter;
 
 1683   marker = (
int *) 
MALLOC_DH ((n + 1) * 
sizeof (int));
 
 1684   colorCounter = (
int *) 
MALLOC_DH ((n + 1) * 
sizeof (int));
 
 1685   for (i = 0; i <= n; ++i)
 
 1688       colorCounter[i] = 0;
 
 1694   for (i = 0; i < n; ++i)
 
 1700       for (j = rp[i]; j < rp[i + 1]; ++j)
 
 1702     int nabor = cval[j];
 
 1705         int naborsColor = color[nabor];
 
 1706         marker[naborsColor] = i;
 
 1711       thisNodesColor = -1;
 
 1712       for (j = 0; j < n; ++j)
 
 1720       color[i] = thisNodesColor;
 
 1721       colorCounter[1 + thisNodesColor] += 1;
 
 1729   for (i = 1; i < n; ++i)
 
 1731       if (colorCounter[i] == 0)
 
 1733       colorCounter[i] += colorCounter[i - 1];
 
 1736   for (i = 0; i < n; ++i)
 
 1738       o2n[i] = colorCounter[color[i]];
 
 1739       colorCounter[color[i]] += 1;
 
 1752     for (j = 0; j < n; ++j)
 
 1754   if (marker[j] == -1)
 
 1767     for (i = 0; i < n; ++i)
 
 1783 #define __FUNC__ "SubdomainGraph_dhDump" 
 1803   fprintf (fp, 
"----- colors used\n");
 
 1804   fprintf (fp, 
"%i\n", s->
colors);
 
 1807       fprintf (fp, 
"s->colorVec == NULL\n");
 
 1811       fprintf (fp, 
"----- colorVec\n");
 
 1812       for (i = 0; i < sCt; ++i)
 
 1814     fprintf (fp, 
"%i ", s->
colorVec[i]);
 
 1821       fprintf (fp, 
"s->o2n_sub == NULL || s->o2n_sub == NULL\n");
 
 1825       fprintf (fp, 
"----- o2n_sub\n");
 
 1826       for (i = 0; i < sCt; ++i)
 
 1828     fprintf (fp, 
"%i ", s->
o2n_sub[i]);
 
 1831       fprintf (fp, 
"----- n2o_sub\n");
 
 1832       for (i = 0; i < sCt; ++i)
 
 1834     fprintf (fp, 
"%i ", s->
n2o_sub[i]);
 
 1842       fprintf (fp, 
"s->beg_row == NULL || s->beg_rowP == NULL\n");
 
 1846       fprintf (fp, 
"----- beg_row\n");
 
 1847       for (i = 0; i < sCt; ++i)
 
 1849     fprintf (fp, 
"%i ", 1 + s->
beg_row[i]);
 
 1852       fprintf (fp, 
"----- beg_rowP\n");
 
 1853       for (i = 0; i < sCt; ++i)
 
 1855     fprintf (fp, 
"%i ", 1 + s->
beg_rowP[i]);
 
 1863       fprintf (fp, 
"s->row_count == NULL || s->bdry_count == NULL\n");
 
 1867       fprintf (fp, 
"----- row_count\n");
 
 1868       for (i = 0; i < sCt; ++i)
 
 1873       fprintf (fp, 
"----- bdry_count\n");
 
 1874       for (i = 0; i < sCt; ++i)
 
 1883   if (s->
ptrs == NULL || s->
adj == NULL)
 
 1885       fprintf (fp, 
"s->ptrs == NULL || s->adj == NULL\n");
 
 1891       fprintf (fp, 
"----- subdomain graph\n");
 
 1892       for (i = 0; i < sCt; ++i)
 
 1894     fprintf (fp, 
"%i :: ", i);
 
 1901     for (j = s->
ptrs[i]; j < s->
ptrs[i + 1]; ++j)
 
 1903         fprintf (fp, 
"%i ", s->
adj[j]);
 
 1917       SET_V_ERROR (
"s->beg_rowP == NULL; can't continue");
 
 1921       SET_V_ERROR (
"s->row_count == NULL; can't continue");
 
 1925       SET_V_ERROR (
"s->o2n_sub == NULL; can't continue");
 
 1937     fprintf (fp, 
"s->n2o_row == NULL|| s->o2n_col == NULL\n");
 
 1941     fprintf (fp, 
"----- n2o_row\n");
 
 1942     for (i = 0; i < s->
m; ++i)
 
 1944         fprintf (fp, 
"%i ", 1 + s->
n2o_row[i]);
 
 1955     fprintf (fp, 
"----- o2n_col\n");
 
 1956     for (i = 0; i < sCt; ++i)
 
 1961         for (j = br; j < er; ++j)
 
 1963       fprintf (fp, 
"%i ", 1 + s->
o2n_col[j]);
 
 1987       for (pe = 0; pe < 
np_dh; ++pe)
 
 1995     fprintf (fp, 
"----- n2o_row\n");
 
 1997         for (i = 0; i < 
m; ++i)
 
 1999       fprintf (fp, 
"%i ", 1 + s->
n2o_row[i] + beg_row);
 
 2001         if (
id == np_dh - 1)
 
 2011       for (pe = 0; pe < 
np_dh; ++pe)
 
 2019     fprintf (fp, 
"----- o2n_col\n");
 
 2021         for (i = 0; i < 
m; ++i)
 
 2023       fprintf (fp, 
"%i ", 1 + s->
o2n_col[i] + beg_row);
 
 2044 #define __FUNC__ "find_bdry_nodes_seq_private" 
 2051   tmp = (
int *) 
MALLOC_DH (m * 
sizeof (
int));
 
 2053   for (i = 0; i < 
m; ++i)
 
 2059   for (i = 0; i < 
blocks; ++i)
 
 2062       int end_row = beg_row + s->
row_count[i];
 
 2064       for (row = beg_row; row < end_row; ++row)
 
 2066     bool isBdry = 
false;
 
 2071     for (j = 0; j < len; ++j)
 
 2075         if (col < beg_row || col >= end_row)
 
 2091   for (i = 0; i < 
blocks; ++i)
 
 2094       int end_row = beg_row + s->
row_count[i];
 
 2096       for (row = beg_row; row < end_row; ++row)
 
 2107   for (i = 0; i < 
blocks; ++i)
 
 2110       int end_row = beg_row + s->
row_count[i];
 
 2114       for (row = beg_row; row < end_row; ++row)
 
 2122         s->
o2n_col[row] = interiorIDX++;
 
 2136 #define __FUNC__ "SubdomainGraph_dhPrintSubdomainGraph" 
 2145          "\n-----------------------------------------------------\n");
 
 2146       fprintf (fp, 
"SubdomainGraph, and coloring and ordering information\n");
 
 2147       fprintf (fp, 
"-----------------------------------------------------\n");
 
 2148       fprintf (fp, 
"colors used: %i\n", s->
colors);
 
 2150       fprintf (fp, 
"o2n ordering vector: ");
 
 2151       for (i = 0; i < s->
blocks; ++i)
 
 2152   fprintf (fp, 
"%i ", s->
o2n_sub[i]);
 
 2154       fprintf (fp, 
"\ncoloring vector (node, color): \n");
 
 2155       for (i = 0; i < s->
blocks; ++i)
 
 2156   fprintf (fp, 
"  %i, %i\n", i, s->
colorVec[i]);
 
 2159       fprintf (fp, 
"Adjacency lists:\n");
 
 2161       for (i = 0; i < s->
blocks; ++i)
 
 2163     fprintf (fp, 
"   P_%i :: ", i);
 
 2164     for (j = s->
ptrs[i]; j < s->
ptrs[i + 1]; ++j)
 
 2166         fprintf (fp, 
"%i ", s->
adj[j]);
 
 2170       fprintf (fp, 
"-----------------------------------------------------\n");
 
 2176 #define __FUNC__ "adjust_matrix_perms_private" 
 2183   for (i = 0; i < 
blocks; ++i)
 
 2186       int end_row = beg_row + s->
row_count[i];
 
 2188       for (j = beg_row; j < end_row; ++j)
 
 2197 #define __FUNC__ "SubdomainGraph_dhPrintRatios" 
 2213       fprintf (fp, 
"Subdomain interior/boundary node ratios\n");
 
 2214       fprintf (fp, 
"---------------------------------------\n");
 
 2217       for (i = 0; i < 
blocks; ++i)
 
 2238     for (i = 0; i < 
blocks; ++i)
 
 2240         fprintf (fp, 
"%0.2g  ", ratio[i]);
 
 2251     fprintf (fp, 
"10 smallest ratios: ");
 
 2252     for (i = 0; i < 10; ++i)
 
 2254         fprintf (fp, 
"%0.2g  ", ratio[i]);
 
 2257     fprintf (fp, 
"10 largest ratios:  ");
 
 2259       int start = blocks - 6, stop = blocks - 1;
 
 2260       for (i = start; i < stop; ++i)
 
 2262     fprintf (fp, 
"%0.2g  ", ratio[i]);
 
 2273 #define __FUNC__ "SubdomainGraph_dhPrintStats" 
 2279   fprintf_dh (fp, 
"\nSubdomainGraph timing report\n");
 
 2280   fprintf_dh (fp, 
"-----------------------------\n");
 
 2282   fprintf_dh (fp, 
"  find neighbors in subdomain graph: %0.2f\n",
 
 2284   fprintf_dh (fp, 
"  locally order interiors and bdry:  %0.2f\n",
 
 2286   fprintf_dh (fp, 
"  form and color subdomain graph:    %0.2f\n",
 
 2288   fprintf_dh (fp, 
"  exchange bdry permutations:        %0.2f\n",
 
 2290   fprintf_dh (fp, 
"  everything else (should be small): %0.2f\n",
 
 2291         timing[TOTAL_SGT] - (timing[FIND_NABORS_SGT] +
 
 2292            timing[ORDER_BDRY_SGT] +
 
 2293            timing[FORM_GRAPH_SGT] +
 
 2294            timing[EXCHANGE_PERMS_SGT]));
 
static void find_all_neighbors_sym_private(SubdomainGraph_dh s, int m, void *A)
void EuclidGetRow(void *A, int row, int *len, int **ind, double **val)
static void find_bdry_nodes_sym_private(SubdomainGraph_dh s, int m, void *A, int *interiorNodes, int *bdryNodes, int *interiorCount, int *bdryCount)
void Hash_i_dhInsert(Hash_i_dh h, int key, int dataIN)
void SubdomainGraph_dhCreate(SubdomainGraph_dh *s)
static void find_bdry_nodes_seq_private(SubdomainGraph_dh s, int m, void *A)
#define END_FUNC_VAL(retval)
void SubdomainGraph_dhExchangePerms(SubdomainGraph_dh s)
void SubdomainGraph_dhPrintSubdomainGraph(SubdomainGraph_dh s, FILE *fp)
double timing[TIMING_BINS_SG]
static void init_seq_private(SubdomainGraph_dh s, int blocks, bool bj, void *A)
#define SET_ERROR(retval, msg)
bool Parser_dhHasSwitch(Parser_dh p, char *s)
static void color_subdomain_graph_private(SubdomainGraph_dh s)
static void find_bdry_nodes_unsym_private(SubdomainGraph_dh s, int m, void *A, int *interiorNodes, int *bdryNodes, int *interiorCount, int *bdryCount)
void SubdomainGraph_dhPrintRatios(SubdomainGraph_dh s, FILE *fp)
void Hash_i_dhCreate(Hash_i_dh *h, int sizeIN)
void SubdomainGraph_dhPrintStats(SubdomainGraph_dh sg, FILE *fp)
void SortedSet_dhDestroy(SortedSet_dh ss)
void printf_dh(char *fmt,...)
static void init_mpi_private(SubdomainGraph_dh s, int blocks, bool bj, void *A)
static void find_ordered_neighbors_private(SubdomainGraph_dh s)
void SortedSet_dhGetList(SortedSet_dh ss, int **list, int *count)
void fprintf_dh(FILE *fp, char *fmt,...)
static void find_all_neighbors_unsym_private(SubdomainGraph_dh s, int m, void *A)
void invert_perm(int m, int *pIN, int *pOUT)
void SubdomainGraph_dhDestroy(SubdomainGraph_dh s)
void shellSort_float(const int n, double *x)
int SubdomainGraph_dhFindOwner(SubdomainGraph_dh s, int idx, bool permuted)
static void form_subdomaingraph_mpi_private(SubdomainGraph_dh s)
void SubdomainGraph_dhPrintStatsLong(SubdomainGraph_dh s, FILE *fp)
void SubdomainGraph_dhDump(SubdomainGraph_dh s, char *filename)
static void adjust_matrix_perms_private(SubdomainGraph_dh s, int m)
static void form_subdomaingraph_seq_private(SubdomainGraph_dh s, int m, void *A)
void closeFile_dh(FILE *fpIN)
void SortedSet_dhCreate(SortedSet_dh *ss, int size)
void SortedSet_dhInsert(SortedSet_dh ss, int idx)
void Hash_i_dhDestroy(Hash_i_dh h)
void EuclidRestoreRow(void *A, int row, int *len, int **ind, double **val)
static void allocate_storage_private(SubdomainGraph_dh s, int blocks, int m, bool bj)
FILE * openFile_dh(const char *filenameIN, const char *modeIN)
char msgBuf_dh[MSG_BUF_SIZE_DH]
void EuclidGetDimensions(void *A, int *beg_row, int *rowsLocal, int *rowsGlobal)
void shellSort_int(const int n, int *x)
void SubdomainGraph_dhInit(SubdomainGraph_dh s, int blocks, bool bj, void *A)