Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: [OMPI users] Question about MPI_Barrier
From: Storm Zhang (stormzhg_at_[hidden])
Date: 2010-10-20 17:51:44

Dear all,

I got confused with my recent C++ MPI program's behavior. I have an MPI
program in which I use clock() to measure the time spent between to
MPI_Barrier, just like this:

if if(rank == master) t1 = clock();
"code A";
if if(rank == master) t2 = clock();
"code B";

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.

Thanks for your help.