MPI_Comm_spawn在MSMPI上失败 [英] MPI_Comm_spawn fails on MSMPI

查看:117
本文介绍了MPI_Comm_spawn在MSMPI上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用MPI_Comm_spawn启动第二个过程.仅出于演示目的.该程序非常简单:

I'm trying to use MPI_Comm_spawn to start a second process. Just for demonstration pourposes. The program is quite simple:

int main(int argc, char* argv[])
{   int my_id, numprocs;
MPI_Comm All;
MPI_Init(&argc, &argv) ;                   
MPI_Comm_rank(MPI_COMM_WORLD, &my_id) ;     
     MPI_Comm_size(MPI_COMM_WORLD, &numprocs) ;
cout << "I'm process "<< my_id << " and we are " << numprocs <<endl;
MPI_Comm_spawn("child.exe",MPI_ARGV_NULL,2,MPI_INFO_NULL,my_id,MPI_COMM_WORLD,   &All,MPI_ERRCODES_IGNORE);
MPI_Comm_size(All, &numprocs) ;
cout << "I'm process "<< my_id << " and we are " << numprocs <<endl;
{ 
int i;
cin >> i;
}

MPI_Finalize();                            
return 0;
     }

child.exe与已编译程序位于同一目录中,并且非常简单:

The child.exe is in the same directory of the compiled program, and is also terribly simple:

 int main(int argc, char* argv[])
    {
int my_id, numprocs,length;
     MPI_Comm Parent;
MPI_Win pwin,gwin;
MPI_Init(&argc, &argv) ;                    
MPI_Comm_rank(MPI_COMM_WORLD, &my_id) ;     
     MPI_Comm_size(MPI_COMM_WORLD, &numprocs) ;       
MPI_Comm_get_parent(&Parent);
cout << "I'm child process "<< my_id << " and we are " << numprocs <<endl;
MPI_Comm_size(Parent, &numprocs) ;
cout << "My parent communicator size is: "<< numprocs <<endl;
MPI_Finalize();                            
     return 0;
}

父进程失败并出现严重错误: C:\ Users ..... \ Documents \ Visual Studio 2010 \ Projects \ mpi \ x64 \ Release> mpi.exe 我正在处理0,我们是1

The parent process fails with a criptic error: C:\Users.....\Documents\Visual Studio 2010\Projects\mpi\x64\Release>mpi.exe I'm process 0 and we are 1

工作中止: [排名]消息

job aborted: [ranks] message

[0]致命错误 MPI_Comm_spawn中的致命错误:其他MPI错误,错误堆栈: MPI_Comm_spawn(106)..........:MPI_Comm_spawn(cmd ="child.exe",argv = 0x0000000000 000000,maxprocs = 2,MPI_INFO_NULL,root = 0,MPI_COMM_WORLD,内部通信= 0x000000000 026FC20,错误= 0x0000000000000000)失败 MPID_Comm_spawn_multiple(314):未实现功能

[0] fatal error Fatal error in MPI_Comm_spawn: Other MPI error, error stack: MPI_Comm_spawn(106)..........: MPI_Comm_spawn(cmd="child.exe", argv=0x0000000000 000000, maxprocs=2, MPI_INFO_NULL, root=0, MPI_COMM_WORLD, intercomm=0x000000000 026FC20, errors=0x0000000000000000) failed MPID_Comm_spawn_multiple(314): Function not implemented

我在做错什么....看起来很简单....MSMPI没有实现MPI_Comm_spawn吗?

What I'm doing wrong.... seem so simple.... MSMPI does not implement MPI_Comm_spawn ?

推荐答案

根据

According to this document, it is not supported, at least not in Windows HPC Server 2008.

从文档中:

MS MPI包括一整套MPI2 MPICH2中实现的功能 动态生成的事件除外 和出版,这可能是 包含在更高版本中.

MS MPI includes a complete set of MPI2 functionality as implemented in MPICH2 with the exception of dynamic process spawn and publishing, which may be included in a later release.

这篇关于MPI_Comm_spawn在MSMPI上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆