方案:错误而在openSUSE编译MPI的Hello World程序用C
#include <stdio.h>
#include <mpi.h>
int main (argc, argv)
int argc;
char *argv[];
{
int rank, size;
MPI_Init (&argc, &argv); /* starts MPI */
MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current process id */
MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processes */
printf("Hello world from process %d of %d\n", rank, size);
MPI_Finalize();
return 0;
}
错误:编译
/usr/lib/gcc/i586-suse-linux/4.4/../../../../i586-suse-linux/bin/ld: cannot find -lopen-rte
collect2: ld returned 1 exit status
命令:mpicc hello.c -o ./hello
。 我正在尝试构建一个openSUSE节点的集群。 因此,我正在测试mpich2程序是否在每个节点上运行。
检查这些链接,看起来你的系统配置错误(例如你缺少一些软件包)http://www.lam-mpi.org/MailArchives/lam/2010/04/14195.php,http:// www .lam-mpi.org/MailArchives/lam/2010/04/14196.php – Oz123
这是一个链接器错误;你缺少一个关键的库('libopen-rte.so')。 –
k谢谢...我会解决这个问题.....也在其他节点m得到这个错误:mpi.h没有这样的文件或目录 – user3136546