50 #include <Epetra_ConfigDefs.h> 54 #include <Epetra_MpiComm.h> 57 #include <Epetra_SerialComm.h> 58 #include <Epetra_Time.h> 59 #include <Epetra_Import.h> 60 #include <Epetra_Export.h> 61 #include <Epetra_Map.h> 62 #include <Epetra_LocalMap.h> 63 #include <Epetra_CrsGraph.h> 64 #include <Epetra_CrsMatrix.h> 65 #include <Epetra_Vector.h> 76 const Epetra_Map& column_map);
80 const std::string& input_file_name,
81 std::vector<std::string>& filenames);
84 const std::string& input_file_name,
94 const std::string& input_file_name,
97 Epetra_Map*& range_map,
98 Epetra_Map*& domain_map);
102 const Epetra_Map* rowmap,
104 const Epetra_Map* rangemap,
105 const Epetra_Map* domainmap,
106 Epetra_CrsMatrix*& mat);
109 const std::string& filename,
110 bool do_FillComplete,
111 bool result_mtx_to_file=
false,
122 bool callFillComplete =
true,
123 bool symmetric =
true);
135 int main(
int argc,
char** argv) {
138 MPI_Init(&argc,&argv);
139 Epetra_MpiComm Comm(MPI_COMM_WORLD);
141 Epetra_SerialComm Comm;
144 bool write_result_mtx =
false;
145 bool verbose =
false;
146 int write = 0, inp_specified = 0;
147 bool path_specified =
false;
148 std::string input_file;
149 bool input_file_specified =
false;
151 if (Comm.MyPID()==0) {
152 for(
int ii=0; ii<argc; ++ii) {
153 if (!strcmp(
"-write_result", argv[ii])) write_result_mtx =
true;
154 if (!strcmp(
"-v", argv[ii])) verbose =
true;
155 if (!strcmp(
"-i", argv[ii])) {
156 input_file = argv[ii+1];
157 input_file_specified =
true;
159 if (!strcmp(
"-d",argv[ii])) {
161 path_specified =
true;
164 write = write_result_mtx ? 1 : 0;
165 inp_specified = input_file_specified ? 1 : 0;
168 MPI_Bcast(&write, 1, MPI_INT, 0, MPI_COMM_WORLD);
169 if (write) write_result_mtx =
true;
170 MPI_Bcast(&inp_specified, 1, MPI_INT, 0, MPI_COMM_WORLD);
171 if (inp_specified) input_file_specified =
true;
174 if (!path_specified) {
180 std::cout <<
"two_proc_test returned err=="<<err<<std::endl;
184 std::vector<std::string> filenames;
186 if (input_file_specified) {
187 filenames.push_back(std::string(input_file));
190 input_file =
"infiles";
191 std::cout <<
"specific input-file not specified, getting list of input-files from file 'infiles'." << std::endl;
195 if (path_specified) path_specified =
false;
196 path =
"./MatrixMatrix";
203 std::cout <<
"test_find_rows returned err=="<<err<<std::endl;
209 std::cout <<
"test_drumm1 returned err=="<<err<<std::endl;
213 for(
size_t i=0; i<filenames.size(); ++i) {
214 err =
run_test(Comm, filenames[i],
true, write_result_mtx, verbose);
216 err =
run_test(Comm, filenames[i],
false, write_result_mtx, verbose);
236 int global_err = err;
239 MPI_Allreduce(&err, &global_err, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
248 int numprocs = Comm.NumProc();
249 int localproc = Comm.MyPID();
250 int numlocalrows = 2;
251 int numglobalrows = numprocs*numlocalrows;
252 Epetra_Map rowmap(numlocalrows*numprocs, 0, Comm);
253 Epetra_CrsMatrix matrix(
Copy, rowmap, numglobalrows);
256 int* cols =
new int[numglobalrows];
257 double*vals =
new double[numglobalrows];
259 for(
int j=0; j<numglobalrows; ++j) {
264 Epetra_Map colmap(-1, numglobalrows, cols, 0, Comm);
266 for(
int i=0; i<numlocalrows; ++i) {
267 int row = localproc*numlocalrows+i;
268 err = matrix.InsertGlobalValues(row, 1, &(vals[i]), &row);
274 err = matrix.FillComplete();
281 if (map_rows->NumMyElements() != numglobalrows) {
297 int offset = num_names;
298 if (offset >= alloc_len) {
299 int alloc_increment = 8;
300 const char** newlist =
new const char*[alloc_len+alloc_increment];
301 for(
int i=0; i<offset; ++i) {
302 newlist[i] = names[i];
306 alloc_len += alloc_increment;
307 for(
int i=offset; i<alloc_len; ++i) {
312 names[offset] = newname;
319 if (Comm.NumProc() < 2)
return(0);
322 int len = name.size();
323 int localProc = Comm.MyPID();
324 if (localProc == 0) {
325 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
326 MPI_Bcast((
void*)name.c_str(), len+1, MPI_CHAR, 0, MPI_COMM_WORLD);
329 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
330 name.resize(len+1,
' ');
331 MPI_Bcast((
void*)name.c_str(), len+1, MPI_CHAR, 0, MPI_COMM_WORLD);
339 const std::string& input_file_name,
340 std::vector<std::string>& filenames)
342 int local_err = 0, global_err = 0;
343 std::ifstream* infile = NULL;
344 int pathlen =
path.size();
346 if (Comm.MyPID() == 0) {
347 std::string full_name =
path.empty() ? input_file_name :
path+
"/"+input_file_name;
349 infile =
new std::ifstream(full_name.c_str());
356 Comm.SumAll(&local_err, &global_err, 1);
358 if (global_err != 0) {
363 if (Comm.MyPID() == 0) {
364 const int linelen = 512;
367 std::ifstream& ifile = *infile;
368 while(!ifile.eof()) {
370 sprintf(line,
"%s/",
path.c_str());
371 ifile.getline(&(line[pathlen+1]), linelen);
374 ifile.getline(line, linelen);
380 if (strchr(line,
'#') == NULL) {
381 filenames.push_back(std::string(line));
385 int numfiles = filenames.size();
387 MPI_Bcast(&numfiles, 1, MPI_INT, 0, MPI_COMM_WORLD);
389 for(
int i=0; i<numfiles; ++i) {
398 MPI_Bcast(&numfiles, 1, MPI_INT, 0, MPI_COMM_WORLD);
400 filenames.resize(numfiles);
401 for(
int i=0; i<numfiles; ++i) {
410 const std::string& filename,
411 bool do_FillComplete,
412 bool result_mtx_to_file,
416 char AT[3]; AT[0] =
'^'; AT[1] =
'T'; AT[2] =
'\0';
418 char BT[3]; BT[0] =
'^'; BT[1] =
'T'; BT[2] =
'\0';
422 if(!Comm.MyPID()) std::cout<<
"Testing: "<<
filename<<std::endl;
425 B_file, transB, C_file);
427 std::cout <<
"Error, read_matrix_file_names returned " << err << std::endl;
431 if (!transA) AT[0] =
'\0';
432 if (!transB) BT[0] =
'\0';
434 int localProc = Comm.MyPID();
436 if (localProc == 0 && verbose) {
437 std::cout <<
"Testing C=A"<<AT<<
"*B"<<BT<<
"; A:" << A_file
438 <<
", B:" << B_file <<
", C:" << C_file << std::endl;
441 Epetra_CrsMatrix*
A = NULL;
442 Epetra_CrsMatrix*
B = NULL;
443 Epetra_CrsMatrix*
C = NULL;
444 Epetra_CrsMatrix* C_check = NULL;
446 Epetra_Map* A_row_map = NULL;
447 Epetra_Map* A_col_map = NULL;
448 Epetra_Map* A_range_map = NULL;
449 Epetra_Map* A_domain_map = NULL;
450 err =
create_maps(Comm, A_file, A_row_map, A_col_map, A_range_map, A_domain_map);
452 std::cout <<
"create_maps A returned err=="<<err<<std::endl;
456 Epetra_Map* B_row_map = NULL;
457 Epetra_Map* B_col_map = NULL;
458 Epetra_Map* B_range_map = NULL;
459 Epetra_Map* B_domain_map = NULL;
460 err =
create_maps(Comm, B_file, B_row_map, B_col_map, B_range_map, B_domain_map);
462 std::cout <<
"create_maps B returned err=="<<err<<std::endl;
466 err =
read_matrix(A_file, Comm, A_row_map, A_col_map,
467 A_range_map, A_domain_map,
A);
469 std::cout <<
"read_matrix A returned err=="<<err<<std::endl;
473 err =
read_matrix(B_file, Comm, B_row_map, B_col_map,
474 B_range_map, B_domain_map,
B);
476 std::cout <<
"read_matrix B returned err=="<<err<<std::endl;
480 const Epetra_Map* rowmap = transA ? &(
A->DomainMap()) : &(
A->RowMap());
481 const Epetra_Map* domainMap = transB ? &(
B->RangeMap()) : &(
B->DomainMap());
482 const Epetra_Map* rangeMap = transA ? &(
A->DomainMap()) : &(
A->RangeMap());
485 C =
new Epetra_CrsMatrix(
Copy, *rowmap, 1);
487 if(
C->Comm().MyPID()) printf(
"transA = %d transB = %d\n",(
int)transA,(int)transB);
491 std::cout <<
"err "<<err<<
" from MatrixMatrix::Multiply"<<std::endl;
495 if(!do_FillComplete)
C->FillComplete(*domainMap,*rangeMap);
499 if (result_mtx_to_file) {
503 Epetra_Map* Cck_row_map = NULL;
504 Epetra_Map* Cck_col_map = NULL;
505 Epetra_Map* Cck_range_map = NULL;
506 Epetra_Map* Cck_domain_map = NULL;
507 err =
create_maps(Comm, C_file, Cck_row_map, Cck_col_map,
508 Cck_range_map, Cck_domain_map);
510 std::cout <<
"create_maps C returned err=="<<err<<std::endl;
514 err =
read_matrix(C_file, Comm, Cck_row_map, Cck_col_map,
515 Cck_range_map, Cck_domain_map, C_check);
517 std::cout <<
"read_matrix C returned err=="<<err<<std::endl;
525 double inf_norm = C_check->NormInf();
529 if (inf_norm < 1.e-13) {
530 if (localProc == 0 && verbose) {
531 std::cout <<
"Test Passed" << std::endl;
536 if (localProc == 0) {
537 std::cout <<
"Test Failed ("<<
filename<<
"), inf_norm = " << inf_norm << std::endl;
540 std::cout <<
"C"<<std::endl;
541 std::cout << *
C<<std::endl;
545 if(!transA && !transB &&
A->RowMap().SameAs(
B->RowMap())) {
546 if(!Comm.MyPID()) std::cout<<
"--Testing: Jacobi for same matrices"<<std::endl;
547 delete C;
delete C_check;
550 Epetra_Vector Dinv(
B->RowMap());
554 C =
new Epetra_CrsMatrix(
Copy,
B->RowMap(),0);
558 Dinv.PutScalar(omega);
559 Epetra_CrsMatrix * AB =
new Epetra_CrsMatrix(
Copy,
B->RowMap(),0);
560 C_check =
new Epetra_CrsMatrix(
Copy,
B->RowMap(),0);
567 C_check->FillComplete(
B->DomainMap(),
B->RangeMap());
570 inf_norm = C_check->NormInf();
572 if (inf_norm < 1.e-13) {
573 if (localProc == 0 && verbose) {
574 std::cout <<
"Jacobi Test Passed" << std::endl;
579 if (localProc == 0) {
580 std::cout <<
"Jacobi Test Failed ("<<
filename<<
"), inf_norm = " << inf_norm << std::endl;
583 std::cout <<
"C"<<std::endl;
584 std::cout << *
C<<std::endl;
608 delete Cck_range_map;
609 delete Cck_domain_map;
615 const std::string& input_file_name,
622 if (Comm.MyPID()==0) {
623 std::ifstream infile(input_file_name.c_str());
625 std::cout <<
"error opening input file " << input_file_name << std::endl;
629 const int linelen = 512;
632 infile.getline(line, linelen);
634 if (strchr(line,
'#') == NULL) {
635 A_file =
path+
"/"+line;
639 infile.getline(line, linelen);
641 if (!strcmp(line,
"TRANSPOSE")) {
647 infile.getline(line, linelen);
649 if (strchr(line,
'#') == NULL) {
650 B_file =
path+
"/"+line;
654 infile.getline(line, linelen);
656 if (!strcmp(line,
"TRANSPOSE")) {
662 infile.getline(line, linelen);
664 if (strchr(line,
'#') == NULL) {
665 C_file =
path+
"/"+line;
673 int len = transA ? 1 : 0;
674 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
675 len = transB ? 1 : 0;
676 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
685 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
686 transA = len==1 ? true :
false;
687 MPI_Bcast(&len, 1, MPI_INT, 0, MPI_COMM_WORLD);
688 transB = len==1 ? true :
false;
696 const std::string& input_file_name,
697 Epetra_Map*& row_map,
698 Epetra_Map*& col_map,
699 Epetra_Map*& range_map,
700 Epetra_Map*& domain_map)
704 (Epetra_BlockMap*&)row_map,
705 (Epetra_BlockMap*&)col_map,
706 (Epetra_BlockMap*&)range_map,
707 (Epetra_BlockMap*&)domain_map)
713 const Epetra_Map* rowmap,
715 const Epetra_Map* rangemap,
716 const Epetra_Map* domainmap,
717 Epetra_CrsMatrix*& mat)
721 *rangemap, *domainmap, mat);
730 int thisproc = Comm.MyPID();
731 int numprocs = Comm.NumProc();
734 if (numprocs != 2)
return(0);
738 int numGlobalRows = 2;
741 if (thisproc == 1) myrow = 7;
742 Epetra_Map rowmap(numGlobalRows, numMyRows, &myrow, 0, Comm);
746 int numGlobalCols = 10;
748 int* mycols =
new int[numGlobalCols];
750 for(i=0; i<numGlobalCols; ++i) {
754 Epetra_Map domainmap(numGlobalCols, numMyCols, &(mycols[thisproc*numMyCols]),
758 Epetra_CrsMatrix
A(
Copy, rowmap, 10);
759 Epetra_CrsMatrix
B(
Copy, rowmap, 10);
760 Epetra_CrsMatrix
C(
Copy, rowmap, 10);
762 double* coefs =
new double[numGlobalCols];
763 for(i=0; i<numGlobalCols; ++i) {
767 int numCols = numGlobalCols - 2;
769 if (thisproc == 1) offset = 2;
771 int err =
A.InsertGlobalValues(myrow, numCols, &coefs[offset], &mycols[offset]);
773 err +=
B.InsertGlobalValues(myrow, numMyCols, &(coefs[thisproc*numMyCols]),
774 &(mycols[thisproc*numMyCols]));
776 err +=
A.FillComplete(domainmap, rowmap);
777 err +=
B.FillComplete(domainmap, rowmap);
790 if (
C.NumGlobalNonzeros() != 4) {
803 const int magic_num = 3000;
808 int localn = magic_num/Comm.NumProc();
814 Epetra_CrsMatrix*
C =
new Epetra_CrsMatrix(
Copy,
A->RowMap(), 0);
816 Epetra_Time timer(Comm);
817 double start_time = timer.WallTime();
821 int globaln = localn*Comm.NumProc();
823 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A*A, time: " 824 << timer.WallTime()-start_time << std::endl;
829 start_time = timer.WallTime();
834 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A*A, time: " 835 << timer.WallTime()-start_time <<
" (C already Filled)\n" <<std::endl;
840 C =
new Epetra_CrsMatrix(
Copy,
A->RowMap(), 0);
842 start_time = timer.WallTime();
847 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A*A^T, time: " 848 << timer.WallTime()-start_time << std::endl;
853 start_time = timer.WallTime();
858 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A*A^T, time: " 859 << timer.WallTime()-start_time <<
" (C already Filled)\n" <<std::endl;
864 C =
new Epetra_CrsMatrix(
Copy,
A->RowMap(), 0);
866 start_time = timer.WallTime();
871 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A^T*A, time: " 872 << timer.WallTime()-start_time << std::endl;
877 start_time = timer.WallTime();
882 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A^T*A, time: " 883 << timer.WallTime()-start_time <<
" (C already Filled)\n"<<std::endl;
888 C =
new Epetra_CrsMatrix(
Copy,
A->RowMap(), 0);
890 start_time = timer.WallTime();
895 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A^T*A^T, time: " 896 << timer.WallTime()-start_time << std::endl;
901 start_time = timer.WallTime();
906 std::cout <<
"size: " << globaln <<
"x"<<globaln<<
", C = A^T*A^T, time: " 907 << timer.WallTime()-start_time <<
" (C already Filled)\n" <<std::endl;
920 bool callFillComplete,
925 Epetra_MpiComm comm(MPI_COMM_WORLD);
927 Epetra_SerialComm comm;
929 int global_num_rows = numProcs*local_n;
931 Epetra_Map rowmap(global_num_rows, local_n, 0, comm);
934 Epetra_CrsMatrix* matrix =
935 new Epetra_CrsMatrix(
Copy, rowmap, nnz_per_row);
938 double negOne = -1.0;
940 double val_L = symmetric ? negOne : -0.5;
942 for (
int i=0; i<local_n; i++) {
943 int GlobalRow = matrix->GRID(i);
944 int RowLess1 = GlobalRow - 1;
945 int RowPlus1 = GlobalRow + 1;
946 int RowLess5 = GlobalRow - 5;
947 int RowPlus5 = GlobalRow + 5;
948 int RowLess9 = GlobalRow - 9;
949 int RowPlus9 = GlobalRow + 9;
950 int RowLess24 = GlobalRow - 24;
951 int RowPlus24 = GlobalRow + 24;
952 int RowLess48 = GlobalRow - 48;
953 int RowPlus48 = GlobalRow + 48;
958 matrix->InsertGlobalValues(GlobalRow, 1, &val_L, &RowLess48);
961 matrix->InsertGlobalValues(GlobalRow, 1, &val_L, &RowLess24);
964 matrix->InsertGlobalValues(GlobalRow, 1, &val_L, &RowLess9);
967 matrix->InsertGlobalValues(GlobalRow, 1, &val_L, &RowLess5);
970 matrix->InsertGlobalValues(GlobalRow, 1, &val_L, &RowLess1);
972 if (RowPlus1<global_num_rows) {
973 matrix->InsertGlobalValues(GlobalRow, 1, &negOne, &RowPlus1);
975 if (RowPlus5<global_num_rows) {
976 matrix->InsertGlobalValues(GlobalRow, 1, &negOne, &RowPlus5);
978 if (RowPlus9<global_num_rows) {
979 matrix->InsertGlobalValues(GlobalRow, 1, &negOne, &RowPlus9);
981 if (RowPlus24<global_num_rows) {
982 matrix->InsertGlobalValues(GlobalRow, 1, &negOne, &RowPlus24);
984 if (RowPlus48<global_num_rows) {
985 matrix->InsertGlobalValues(GlobalRow, 1, &negOne, &RowPlus48);
988 matrix->InsertGlobalValues(GlobalRow, 1, &posTwo, &GlobalRow);
991 if (callFillComplete) {
992 int err = matrix->FillComplete();
994 std::cout <<
"create_epetra_matrix: error in matrix.FillComplete()" 1004 int size = Comm.NumProc();
1005 if (size != 2)
return 0;
1007 int rank = Comm.MyPID();
1010 int numGlobalElements = 2;
1012 Epetra_Map emap(numGlobalElements, indexBase, Comm);
1014 Epetra_CrsMatrix
A(
Copy, emap, 0);
1019 std::vector<std::vector<double> > vals(numGlobalElements);
1020 vals[0].push_back(3); vals[0].push_back(4);
1021 vals[1].push_back(1); vals[1].push_back(2);
1023 std::vector<int> indices;
1024 indices.push_back(0); indices.push_back(1);
1026 for (
int row=0; row<numGlobalElements; ++row) {
1027 if (
A.MyGRID(row) )
1028 A.InsertGlobalValues(row, numGlobalElements, &(vals[row][0]), &indices[0]);
1033 Epetra_CrsMatrix
B(
Copy, emap, 0);
1044 B.ExtractGlobalRowCopy(rank, 2, tmp, val, idx);
1046 int test_result = 0;
1049 if (idx[0] == 0 && val[0] != 10.0) test_result = 1;
1050 if (idx[1] == 0 && val[1] != 10.0) test_result = 1;
1051 if (idx[0] == 1 && val[0] != 14.0) test_result = 1;
1052 if (idx[1] == 1 && val[1] != 14.0) test_result = 1;
1055 if (idx[0] == 0 && val[0] != 14.0) test_result = 1;
1056 if (idx[1] == 0 && val[1] != 14.0) test_result = 1;
1057 if (idx[0] == 1 && val[0] != 20.0) test_result = 1;
1058 if (idx[1] == 1 && val[1] != 20.0) test_result = 1;
1061 int global_test_result = 0;
1062 Comm.SumAll(&test_result, &global_test_result, 1);
1064 return global_test_result;
int test_find_rows(Epetra_Comm &Comm)
Epetra_CrsMatrix * create_epetra_crsmatrix(int numProcs, int localProc, int local_n, bool callFillComplete=true, bool symmetric=true)
static int Multiply(const Epetra_CrsMatrix &A, bool transposeA, const Epetra_CrsMatrix &B, bool transposeB, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true, bool keep_all_hard_zeros=false)
Given Epetra_CrsMatrix objects A, B and C, form the product C = A*B.
int time_matrix_matrix_multiply(Epetra_Comm &Comm, bool verbose)
int two_proc_test(Epetra_Comm &Comm, bool verbose=false)
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
int create_maps(Epetra_Comm &Comm, const std::string &input_file_name, Epetra_Map *&row_map, Epetra_Map *&col_map, Epetra_Map *&range_map, Epetra_Map *&domain_map)
int test_drumm1(Epetra_Comm &Comm)
int read_input_file(Epetra_Comm &Comm, const std::string &input_file_name, std::vector< std::string > &filenames)
int MatrixMarketFileToCrsMatrix(const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
Epetra_Map * find_rows_containing_cols(const Epetra_CrsMatrix &M, const Epetra_Map &column_map)
int run_test(Epetra_Comm &Comm, const std::string &filename, bool do_FillComplete, bool result_mtx_to_file=false, bool verbose=false)
static int Add(const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB)
Given Epetra_CrsMatrix objects A and B, form the sum B = a*A + b*B.
int RowMatrixToMatrixMarketFile(const char *filename, const Epetra_RowMatrix &A, const char *matrixName, const char *matrixDescription, bool writeHeader)
Writes an Epetra_RowMatrix object to a Matrix Market format file.
int expand_name_list(const char *newname, const char **&names, int &alloc_len, int &num_names)
static int Jacobi(double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true)
Given Epetra_CrsMatrix objects A, B and C, and Epetra_Vector Dinv, form the product C = (I-omega * Di...
int read_matrix(const std::string &filename, Epetra_Comm &Comm, const Epetra_Map *rowmap, Epetra_Map *colmap, const Epetra_Map *rangemap, const Epetra_Map *domainmap, Epetra_CrsMatrix *&mat)
int read_matrix_file_names(Epetra_Comm &Comm, const std::string &input_file_name, std::string &A_file, bool &transA, std::string &B_file, bool &transB, std::string &C_file)
int MatrixMarketFileToBlockMaps(const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&rowmap, Epetra_BlockMap *&colmap, Epetra_BlockMap *&rangemap, Epetra_BlockMap *&domainmap)
Constructs row,col,range and domain maps from a matrix-market matrix file.
int main(int argc, char **argv)
int broadcast_name(Epetra_Comm &Comm, std::string &name)