14 lines
284 B
C
Executable File
14 lines
284 B
C
Executable File
#include <mpi.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
int rank = 0;
|
|
int size = 0;
|
|
MPI_Init(&argc, &argv);
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
|
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
|
printf("rank=%d size=%d\n", rank, size);
|
|
MPI_Finalize();
|
|
return 0;
|
|
}
|