MSMPI应用程序无法连接到smpd管理器

时间:2015-12-07 19:55:04

标签: c++ multithreading visual-c++ mpi

我遇到了MS HPC Pack的MSMPI问题。我收到了错误: “中止:< PCNAME>上的mpi应用程序无法连接到(null)上的smpd管理器:50892错误1722”。我试图在微软网站上找到答案。没有结果。从2012年到2008年更换hpc包不会生效。谢谢。代码很简单,我敢肯定,问题不在于它,而是:

#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <ctime>
#include <cassert>
#include <math.h>
#include <windows.h>
#include <mpi.h>;
using namespace::std;
int myRank;
int numProcs;
char host[256];
int main(int argc, char* argv[])
{
    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD, &numProcs); // number of processes involved in run
    MPI_Comm_rank(MPI_COMM_WORLD, &myRank); // my process id: 0 <= myRank < numProcs
    gethostname(host, sizeof(host) / sizeof(host[0])); // machine we are running on
    cout << "Process " << myRank << " of " << numProcs << " is running on '" << host <<
        "'." << endl;
    MPI_Finalize();
    system("pause");
    return 0;
}

0 个答案:

没有答案