11 int main(
int argCount,
char **argValue)
16 MPI_Init(&argCount,&argValue);
18 const int rank = Comm.MyPID();
21 int nGlobalElements = 1000000;
37 for (
int globalRowIdx=0; globalRowIdx<nGlobalElements; ++globalRowIdx) {
38 indices[0] = globalRowIdx;
39 values[0] = 3.2 + globalRowIdx*0.01;
41 if (globalRowIdx % 10000 == 0) {
42 std::cerr <<
"About to insert row " << globalRowIdx <<
"\n";
48 b.ReplaceGlobalValues(1, (
const int *)&indices[0],
49 (
const double *)&values[0]);
54 double insertionTime = 0;
56 time_t endTime = time(0);
57 insertionTime = difftime(endTime, startTime);
68 std::cerr <<
"insertion time = " << insertionTime <<
" (seconds)\n";
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_MpiComm: The Epetra MPI Communication Class.
Epetra Finite-Element Vector.
int main(int argc, char *argv[])