2019-04-19|616阅|作者:芙蓉妹妹|举报 摘要:printf("This is process %d of %d process.\n",rank,size);
#include<stdio.h>
#include"mpi.h"
int main(int argc, char **argv){
MPI_Comm comm = MPI_COMM_WORLD;
int size ,rank;
MPI_Init(&argc,&argv);
MPI_Comm_size(comm,&size);
MPI_Comm_rank(comm,&rank);
printf("This is process %d of % process.\n",rank,size);
MPI_Finalize();
return 0;
}