Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Question about MPI_Barrier
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-10-21 06:17:36

On Oct 20, 2010, at 5:51 PM, Storm Zhang wrote:

> I need to measure t2-t1 to see the time spent on the code A between these two MPI_Barriers. I notice that if I comment code B, the time seems much less the original time (almost half). How does it happen? What is a possible reason for it? I have no idea.

I'm not sure what you're asking here -- do you mean that if you put some comments in code B, it takes much less time than if you don't put comments? If so, then the comments have nothing to do with the execution run-time -- something else is going on that is causing the delay. Some questions:

- how long does it take to execute code B -- microseconds, or seconds, or ...?
- how many processes are involved?
- what are you doing in code B; is it communication intensive and/or do you synchronize with other processes?
- are you doing your timings on otherwise-empty machines?

Jeff Squyres
For corporate legal information go to: