41 int main(
int argc,
char* argv[])
44 MPI_Init(&argc, &argv);
45 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
46 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
52 cout <<
"Usage: ./TransposeTest <BASEADDRESS> <Matrix> <MatrixTranspose>" << endl;
53 cout <<
"Input file <Matrix> and <MatrixTranspose> should be under <BASEADDRESS> in triples format" << endl;
59 string directory(argv[1]);
60 string normalname(argv[2]);
61 string transname(argv[3]);
62 normalname = directory+
"/"+normalname;
63 transname = directory+
"/"+transname;
66 shared_ptr<CommGrid> fullWorld;
67 fullWorld.reset(
new CommGrid(MPI_COMM_WORLD, 0, 0) );
69 PARBOOLMAT
A(fullWorld);
70 PARBOOLMAT AT(fullWorld);
71 PARBOOLMAT ATControl(fullWorld);
72 A.ReadDistribute(normalname, 0);
76 ATControl.ReadDistribute(transname, 0);
79 SpParHelper::Print(
"Transpose working correctly\n");
83 SpParHelper::Print(
"ERROR in transpose, go fix it!\n");
int main(int argc, char *argv[])