c - Different time measurements with MPI -


i getting different time measurements every time run mpi application. measuring time this:

mpit1 = mpi_wtime();  // work  mpit2 = mpi_wtime(); mpielapsed = mpit2 - mpit1; 

the behavior same, or without mpi_barrier(mpi_comm_world);. result of program, of course, correct every time executable runs.

check extreme difference got 5x5 matrix:

0.00025 seconds // first run 0.10728 seconds // second run 

moreover, problem occurring larger matrices, 2000x2000:

0.55996 seconds // first run 0.83657 seconds // second run 

am measuring time in wrong way? or knowing issue mpi? note time reported master node.

i running program in computer, have logged in ssh. recall getting faster execution when sitting in computer. user logged in:

gsamaras@pythagoras:~/konstantis/cholesky$ gsamaras internet connection gsamaras@pythagoras:~/konstantis/cholesky$ 

edit many runs:

1.6035 0.422967 1.53891 0.347107 0.761991 1.22824 0.934829 0.45618 0.794225 0.554099 1.09323 0.421858 0.621015 0.889867 0.613867 0.459144 2.02273 0.67689 2.2390 1.0448 0.751333 

edit_2

  1. i got timings, calling program many times in run.sh.
  2. i running program in one machine, 4 cores.
  3. i using mpich2.

from colleague , patrick concluded that:

  1. the startup time mpi can vary lot.
  2. relatively small execution times not trust-worthy , may vary lot.

Comments