#include #include using namespace std; int main(int argc, char* argv[]) { MPI::Init(argc, argv); int id = MPI::COMM_WORLD.Get_rank(); int np = MPI::COMM_WORLD.Get_size(); char processor_name[MPI_MAX_PROCESSOR_NAME]; int len; MPI::Get_processor_name(processor_name, len); cout << "Hello world from process " << id << " out of " << np << ", processor name " << processor_name << endl; MPI::Finalize(); return 0; }