如何在PARPACK中运行MPI示例

如何在PARPACK中运行MPI示例,mpi,arpack,Mpi,Arpack,我能够编译psndrv1.f,这是ARPACK/PARPACK/example/MPI文件夹中的一个示例。但是,当我使用命令mpirun-np4a.out运行程序时,我得到了以下错误 [.th:9951] *** An error occurred in MPI_Allreduce [.th:9951] *** on communicator MPI_COMM_WORLD [.th:9951] *** MPI_ERR_OP: invalid reduce operation [.th:9951]

我能够编译
psndrv1.f
,这是
ARPACK/PARPACK/example/MPI
文件夹中的一个示例。但是,当我使用命令
mpirun-np4a.out
运行程序时,我得到了以下错误

[.th:9951] *** An error occurred in MPI_Allreduce
[.th:9951] *** on communicator MPI_COMM_WORLD
[.th:9951] *** MPI_ERR_OP: invalid reduce operation
[.th:9951] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 9951 on
node superinfra.ku.ac.th exiting improperly. There are two reasons this could oc
cur:

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 mpirun (as reported here).
--------------------------------------------------------------------------
[.th:09950] 3 more processes have sent help message help-mpi-err
ors.txt / mpi_errors_are_fatal
[.th:09950] Set MCA parameter "orte_base_help_aggregate" to 0 to
 see all help / error messages

我用的是岩石群。请帮忙。

事实上,我今天遇到了一个完全相同的问题,并设法解决了它。我想和大家分享一下困扰我的问题,以防有人陷入同样的陷阱。我用来编译的mpi库与PARPACK包中包含的“mpif.h”文件不匹配


根据我的观察,PARPACK包有3个mpif.h文件。我的解决方案是将PARPACK目录树中的所有“mpif.h”文件替换为我的mpi库的“mpif.h”文件

事实上,我今天遇到了一个完全相同的问题,并设法解决了它。我想和大家分享一下困扰我的问题,以防有人陷入同样的陷阱。我用来编译的mpi库与PARPACK包中包含的“mpif.h”文件不匹配


根据我的观察,PARPACK包有3个mpif.h文件。我的解决方案是将PARPACK目录树中的所有“mpif.h”文件替换为我的mpi库的“mpif.h”文件

从错误消息看,它似乎对
MPI\u Allreduce
使用了错误/无效的操作。你能找出它经过那里的是什么操作吗?此外,把代码放在你的问题中也会有帮助——这实际上是受SO鼓励的。用于编译代码或链接PARPACK库的[version of the]MPI实现与
mpirun
源代码不同。@xeroqu我编译的代码是ARPACK。这是别人写的。它包含很多文件。我不知道该显示什么代码。@HristoIliev谢谢你的建议。我试着用不同的mpi跑步。它们都失败了,但有些会有不同的错误消息。我建议您清理整个项目,从头开始重建所有内容,同时确保整个过程中只使用一个版本的MPI。通常,安装同一MPI库的多个MPI实现或版本是一个坏主意™ 除非处理得当。如果ARPACK是预编译的,请确保您使用完全相同的MPI实现和版本来构建和运行示例。从错误消息看,它似乎对
MPI\u Allreduce
使用了错误/无效的操作。你能找出它经过那里的是什么操作吗?此外,把代码放在你的问题中也会有帮助——这实际上是受SO鼓励的。用于编译代码或链接PARPACK库的[version of the]MPI实现与
mpirun
源代码不同。@xeroqu我编译的代码是ARPACK。这是别人写的。它包含很多文件。我不知道该显示什么代码。@HristoIliev谢谢你的建议。我试着用不同的mpi跑步。它们都失败了,但有些会有不同的错误消息。我建议您清理整个项目,从头开始重建所有内容,同时确保整个过程中只使用一个版本的MPI。通常,安装同一MPI库的多个MPI实现或版本是一个坏主意™ 除非处理得当。如果ARPACK是预编译的,请确保您使用完全相同的MPI实现和版本来构建和运行示例。