Question

Basically I need a function to return the same value at the same physical time on all the nodes. I am originally using gettimeofday, but not sure it will do the synchronizing timing between different nodes or not.

Now I am considering using MPI_Wtime. First I checked MPI_WTIME_IS_GLOBAL value when running MPI tasks, since the manual says that

The value returned for MPI_WTIME_IS_GLOBAL is 1 if clocks MPI_WTIME_IS_GLOBAL at all processes in MPI_COMM_WORLD are synchronized, 0 otherwise. 

My MPI running returns 3 instead of 1 or 0. I am not sure what "3" means as retuned in my MPI running?

BTW, the manual also says that:

The boolean variable MPI_WTIME_IS_GLOBAL, a predefined attribute key that indicates whether clocks are synchronized, does not have a valid value in Open MPI, as the clocks are not guaranteed to be synchronized.

but I am actually using OpenMPI-1.7.2. Does that mean I can't find a synchronizing timing method with OpenMPI?

Was it helpful?

Solution

From the OpenMPI (1.7.1) documentation:

The boolean variable MPI_WTIME_IS_GLOBAL, a predefined attribute key that indicates whether clocks are synchronized, does not have a valid value in Open MPI, as the clocks are not guaranteed to be synchronized.

It seems unlikely to me that this feature will have changed from 1.7.1 to 1.7.2 so I suspect that the answer to your question is No, OpenMPI does not provide synchronised timing across processes. An integer value of 3 supports the idea that a boolean variable does not have a valid value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top