poprawka liczenia czasu
This commit is contained in:
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 |
@@ -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();
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user