首页 > 解决方案 > 在 MPI 中,非阻塞 I/O 用于什么?

问题描述

我假设:非阻塞 I/O 用于利用数据加载和计算之间的差距。换句话说,在加载数据的同时,我们可以同时进行一些计算。因此,以下程序

MPI_File_read_at_all_begin(...);
... // do some computations
MPI_File_read_at_all_end(...);

表现应该比

MPI_File_read_at_all(...);
... // the same computations of the previous program

但是,我没有看到预期的结果。为什么?我误会了吗?</p>

标签: c++iompinonblocking

解决方案


我用类似的东西修复了它

{ // run with a thread
    MPI_File_read_at_all_begin(...);
    MPI_File_read_at_all_end(...);
}
... // do some computations

推荐阅读