1
使用MPI,您如何等待线程完成?等待其他处理器在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();
我的意思是进程/排名。谢谢,那正是我正在寻找的。 – 2012-04-24 21:45:59