mpi程序运行失败、、、
环境:WinXP + VC6.0 + mpich2
程序代码如下:
#include "mpi.h"
#include <stdio.h>
void main (int argc,char* argv[])
{
int myid,numprocs;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Get_processor_name(processor_name,&namelen);
fprintf(stderr,"Hello World! Process %d of %d on %s\n",myid,numprocs,processor_name );
MPI_Finalize();
}
程序在node1上运行成功,打印输出;在node2上运行没有任何结果,也不报错、、、用窗口mpiexec wrapper运行的话 选中命令行运行 则命令行会一闪而过。。
在多机运行的话会出现错误:
[1] PMI_Init failed: FAIL - init called when another process has exited without calling init
Fatal error in MPI_Init: Other MPI error,error stack:
MPIR_Init_thread(392):
MPID_Init(107)
....
求教》》》