LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Compare times to run a program - Serial vs MPI (https://www.linuxquestions.org/questions/programming-9/compare-times-to-run-a-program-serial-vs-mpi-926421/)

rpd25 01-29-2012 11:43 PM

Compare times to run a program - Serial vs MPI
 
Hi,

I have a fortran program with serial and MPI version. I want to compare the time taken by these programs to run. I use ifort/gfortran compiler.

How to compare the time taken by each program to run? Is there any sample code for comparison?

Thanks,
Rakesh

evo2 01-30-2012 05:27 PM

Hi,

i you just want the total execution time, you could use the have you tried using the "time" command on the command line.

Eg.
Code:

time program
If you want actual profiling, you could try using valgrind with the callgrind or cachegrind tools. You can view the output of valgrind with the kcachegrind gui.

HTH,

Evo2.


All times are GMT -5. The time now is 07:31 AM.