MVAPICH2缓冲区别名 [英] Mvapich2 buffer aliasing
问题描述
我用MVAPICH2启动了一个MPI程序,并收到此错误:
I am launched an MPI program with MVAPICH2 and got this error:
Fatal error in PMPI_Gather:
Invalid buffer pointer, error stack:
PMPI_Gather(923): MPI_Gather() failed
PMPI_Gather(857): Buffers must not be aliased
我认为有两种解决方法:
There are two ways I think I could solve this:
- 重写我的MPI程序(使用不同的缓冲区)
- 禁用检查缓冲区别名
有人知道我该如何使用MVAPICH2吗?一些编译器选项,参数,环境变量等?
Do someone know how I could do this with MVAPICH2? Some compiler option, parameter, environmental variable, etc?
类似于MV2_NO_BUFFER_ALIAS_CHECK的东西,但是它不起作用.
Something like MV2_NO_BUFFER_ALIAS_CHECK, but it does not work.
推荐答案
您正在做的是不正确的程序,应该重写代码以使用单独的缓冲区
What you're doing is an incorrect program and you should rewrite your code to use separate buffers
或者,如果要使用与MPI_GATHER
的输入和输出值相同的缓冲区,则可以使用MPI_IN_PLACE
.没有看到您的代码,我无法告诉您如何做到这一点.您可以查看有关MPI_GATHER
的某些文档,并详细了解MPI_IN_PLACE
的工作原理看看是否能解决您的问题.
Alternatively, you might be able to use MPI_IN_PLACE
if you want to use the same buffer as both the input and output values of your MPI_GATHER
. Without seeing your code, I can't tell you how you could do that. You can check out some documentation about MPI_GATHER
and read more about how MPI_IN_PLACE
works and see if that solves your problem.
这篇关于MVAPICH2缓冲区别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!