// MPI demo program // Christoph Federrath, 2016-2017 #include #include #include "mpi.h" // MPI lib using namespace std; /** ----------------------------- Main ------------------------------- ** MPI_TEST main procedure ** ------------------------------------------------------------------ */ int main(int argc, char *argv[]) { // initialize MPI and get number of ranks (NPE) and my rank number (MyPE) MPI_Init(&argc, &argv); int NPE = 0, MyPE = 0; MPI_Comm_size(MPI_COMM_WORLD, &NPE); MPI_Comm_rank(MPI_COMM_WORLD, &MyPE); if (MyPE == 0) cout << "------------------- mpi_test START -------------------" << endl; // print MPI info if (MyPE == 0) cout<<"["<