20 lines
354 B
C++
20 lines
354 B
C++
|
|
#include <iostream>
|
|
#include <sys/time.h>
|
|
#include <mpi.h>
|
|
using namespace std;
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
int my_rank;
|
|
int world_size; /* the number of processes */
|
|
|
|
MPI_Init(&argc, &argv);
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
|
|
MPI_Comm_size(MPI_COMM_WORLD, &world_size);
|
|
|
|
MPI_Finalize();
|
|
|
|
return 0;
|
|
}
|