Advertisement
Guest User

Untitled

a guest
Apr 7th, 2018
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <mpi.h>
  4. #include <math.h>
  5. #include <sys/types.h>
  6. #include <stdint.h>
  7. #include <inttypes.h>
  8.  
  9. /************************************************************
  10. This is a simple hello world program. Each processor prints out
  11. it's rank and the size of the current MPI run (Total number of
  12. processors).
  13. ************************************************************/
  14.  
  15. int main(argc,argv)
  16. int argc;
  17. char *argv[];
  18. {
  19. int myid, numprocs;
  20. FILE *f1;
  21. int i;
  22.  
  23. MPI_Init(&argc,&argv);
  24. MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
  25. MPI_Comm_rank(MPI_COMM_WORLD,&myid);
  26.  
  27. printf("test: %d\n", MPI_DOUBLE);
  28. printf("test2: %d\n", sizeof(MPI_DOUBLE));
  29.  
  30. MPI_Finalize();
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement