0
基本上我需要一个函数来在所有节点上的相同物理时间返回相同的值。我最初使用gettimeofday,但不确定它会执行不同节点之间的同步时间。MPI同步时间
现在我正在考虑使用MPI_Wtime。首先,我运行MPI任务时,因为手册上说
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.
我MPI运行,则返回3而不是1或0。我不知道什么是“3”是指在我的MPI运行重新调校检查MPI_WTIME_IS_GLOBAL价值?
BTW,手册也说:
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.
但我实际使用的openmpi-1.7.2。这是否意味着我找不到OpenMPI的同步计时方法?