【发布时间】:2012-05-05 11:40:06
【问题描述】:
使用 MPI,如何等待线程完成?
例如:
for (int i = localstart; i < localend; i++)
{
// do stuff that is computationally intensive
}
// I need to wait for all other threads to finish here
if (rank == 0) do_something();
【问题讨论】:
标签: mpi