mirror of https://github.com/QMCPACK/qmcpack.git
16 lines
350 B
C
16 lines
350 B
C
#include "mpi.h"
|
|
#include <stdio.h>
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int rank, nprocs;
|
|
|
|
MPI_Init(&argc,&argv);
|
|
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
|
|
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
|
|
MPI_Barrier(MPI_COMM_WORLD);
|
|
printf("Hello, world. I am %d of %d\n", rank, nprocs);fflush(stdout);
|
|
MPI_Finalize();
|
|
return 0;
|
|
}
|
|
|