【发布时间】:2021-05-14 07:09:09
【问题描述】:
有没有办法在 MPI 代码中添加障碍。
我的意思是说,我希望所有不同的处理器首先完成直到一个点,然后从那里继续。也就是说,一个处理器必须等待其他处理器完成代码直到该区域,然后才继续执行代码的剩余部分。
例如,
int main()
{
.
.
.
//I want all my processors to do till this and
wait for other processers to complete till this point,
and then resume the remaining part
.
.
.
}
在 MPIch 中有没有办法做到这一点?
【问题讨论】:
标签: performance parallel-processing mpi hpc barrier