poprawka liczenia czasu

This commit is contained in:
2016-11-02 15:07:09 +01:00
parent 864e0ed15e
commit e4be0fdacc
3 changed files with 5 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -133,6 +133,7 @@ int main(int argc, char *argv[])
// część licząca ---------------------------------------------------------------------------------
//
MPI::COMM_WORLD.Barrier();
if (taskid == 0)
tt.Begin();
@@ -154,16 +155,17 @@ int main(int argc, char *argv[])
vect_c[i] += A[i%rozmiar][k]*vect[(i/rozmiar)*rozmiar+k];
}
}
// zwróć wszystko do programu głównego
MPI::COMM_WORLD.Gather(&vect_c[0], porcja, MPI::LONG, &C_rot[0], porcja, MPI::LONG, 0);
MPI::COMM_WORLD.Barrier();
MPI::COMM_WORLD.Barrier();
if (taskid == 0)
{
long elapsed = tt.End();
cout << "Time: " << elapsed << " ms" << endl;
}
// zwróć wszystko do programu głównego
MPI::COMM_WORLD.Gather(&vect_c[0], porcja, MPI::LONG, &C_rot[0], porcja, MPI::LONG, 0);
if (taskid == 0 && false)
{
for (i=0; i<rozmiar*rozmiar; ++i)