54 #define __FUNC__ "EuclidGetRow"
63 sprintf (
msgBuf_dh,
"ExtractIndicesView(row= %i) returned %i", row + 1,
71 sprintf (
msgBuf_dh,
" ExtractValuesView(row= %i) returned %i", row + 1,
78 #define __FUNC__ "EuclidRestoreRow"
87 #define __FUNC__ "EuclidGetDimensions"
92 int row_start, row_end, col_start, col_end;
101 *beg_row = row_start;
102 *rowsLocal = (row_end - row_start + 1);
119 #define __FUNC__ "PrintMatUsingGetRow"
122 int *n2o_row,
int *n2o_col,
char *filename)
125 int *o2n_col = NULL, pe, i, j, *cval, len;
132 o2n_col = (
int *)
MALLOC_DH (m *
sizeof (
int));
134 for (i = 0; i < m; ++i)
135 o2n_col[n2o_col[i]] = i;
138 for (pe = 0; pe <
np_dh; ++pe)
147 fp = fopen (filename,
"w");
151 fp = fopen (filename,
"a");
155 sprintf (
msgBuf_dh,
"can't open %s for writing\n", filename);
159 for (i = 0; i < m; ++i)
166 for (j = 0; j < len; ++j)
168 fprintf (fp,
"%i %i %g\n", i + 1, cval[j], aval[j]);
175 newRow = n2o_row[i] + beg_row;
178 for (j = 0; j < len; ++j)
180 newCol = o2n_col[cval[j] - beg_row] + beg_row;
181 fprintf (fp,
"%i %i %g\n", i + 1, newCol, aval[j]);
int MinMaxMyGID(void *A, bool Row, bool min)
int NumGlobalRowCol(void *A, bool Row)
int ExtractIndicesView(void *A, int GlobalRow, int *NumEntries, int **Indices)
void EuclidGetRow(void *A, int row, int *len, int **ind, double **val)
void PrintMatUsingGetRow(void *A, int beg_row, int m, int *n2o_row, int *n2o_col, char *filename)
int ExtractValuesView(void *A, int GlobalRow, int *NumEntries, double **Values)
void EuclidRestoreRow(void *A, int row, int *len, int **ind, double **val)
char msgBuf_dh[MSG_BUF_SIZE_DH]
void EuclidGetDimensions(void *A, int *beg_row, int *rowsLocal, int *rowsGlobal)