运行我的OpenMPI程序时,我收到此帖子底部的错误。具体而言,由MPI_ERR_BUFFER: invalid buffer pointer
操作引起的MPI_Recv
错误导致了问题。
我的代码相当冗长,但我相信当我打电话时会发生错误:
MPI_Recv(WTVblock, n_comp * bs_cols, MPI_DOUBLE, i, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
WTVblock
是一个大小为n_comp * bs_cols
的双数组。其余代码可以在https://github.com/olavurmortensen/distributed_nmf/blob/master/main.c找到。接收在第169行,相应的发送在第164行。
错误讯息:
[n-62-14-2:800] *** An error occurred in MPI_Recv
[n-62-14-2:800] *** on communicator MPI_COMM_WORLD
[n-62-14-2:800] *** MPI_ERR_BUFFER: invalid buffer pointer
[n-62-14-2:800] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
[n-62-14-2][[9104,1],2][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104)
[n-62-14-2][[9104,1],4][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104)
[n-62-14-2][[9104,1],3][btl_tcp_frag.c:123:mca_btl_tcp_frag_send] mca_btl_tcp_frag_send: writev failed: Connection reset by peer (104)
--------------------------------------------------------------------------
mpiexec has exited due to process rank 0 with PID 800 on
node n-62-14-2 exiting improperly. There are two reasons this could occur:
1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.
2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"
This may have caused other processes in the application to be
terminated by signals sent by mpiexec (as reported here).
--------------------------------------------------------------------------
编辑:我是MPI和C的新手,所以如果我的问题很愚蠢,或者我的代码中出现了一些可怕的错误,我会道歉。