Search code examples
visual-c++mpihpc

Is the MPI c++ namespace not included in Microsoft HPC Pack 2008 R2?


With Microsoft HPC Pack 2008 R2 installed and using Visual studio 2010 professional, I am able to run MPI programs using the C style, but not the C++ style. For example:

#include <mpi.h>

int main()
{
  MPI_Init(NULL,NULL);
  .
  .
  .
  MPI_Finalize();
  return 0;
}

works but

#include <mpi.h>

int main()
{
  MPI::Init(NULL,NULL);
  .
  .
  .
  MPI::Finalize();
  return 0;
}

doesn't. The error message says the namespace MPI is not found. Am I doing something stupid? It's quite possible. Any help appreciated.

Thanks,

-nuun


Solution

  • http://mpi-forum.org/docs/mpi-2.2/mpi22-report/node328.htm

    As of MPI 2.2:

    The entire set of C++ language bindings have been deprecated.

    Rationale.

    The C++ bindings add minimal functionality over the C bindings while incurring a significant amount of maintenance to the MPI specification. Since the C++ bindings are effectively a one-to-one mapping of the C bindings, it should be relatively easy to convert existing C++ MPI applications to use the MPI C bindings. Additionally, there are third party packages available that provide C++ class library functionality (i.e., C++-specific functionality layered on top of the MPI C bindings) that are likely more expressive and/or natural to C++ programmers and are not suitable for standardization in this specification. ( End of rationale.)