0
我有最简单的代码的 “Hello world”意外返回消息: “闹钟”
#include <stdio.h> /* printf and BUFSIZ defined there */
#include <stdlib.h> /* exit defined there */
#include <mpi.h> /* all MPI-2 functions defined there */
int main(argc, argv)
int argc;
char *argv[];
{
int rank, size, length;
char name[BUFSIZ];
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Get_processor_name(name, &length);
printf("%s: hello world from process %d of %d\n", name, rank, size);
MPI_Finalize();
exit(0);
}
我编这
mpicc -o hello hello.c
,并试图用4个进程
运行mpirun -np 4 hello
它返回;
[email protected]:~/MpiProgrammes$ mpicc -o hello Hello.c
[email protected]:~/MpiProgrammes$ mpirun -np 4 hello
Alarm clock
[email protected]:~/MpiProgrammes$
它可能是什么?
哪个平台和MPI实现您使用,包括版本? – msw 2010-10-02 16:01:24
在mpirun-ing之前你有lamboo(启动lam mpi守护进程)吗?例如lamboot; mpirun -np 4 hello; lamhalt? – 2010-10-02 16:24:56