main.f90 461 B

12345678910111213141516171819202122
  1. program mpitest
  2. implicit none
  3. include 'mpif.h'
  4. logical :: flag
  5. integer :: ier
  6. call MPI_Init(ier)
  7. if (ier /= 0) then
  8. print *, 'Unable to initialize MPI: ', ier
  9. stop 1
  10. endif
  11. call MPI_Initialized(flag, ier)
  12. if (ier /= 0) then
  13. print *, 'Unable to check MPI initialization state: ', ier
  14. stop 1
  15. endif
  16. call MPI_Finalize(ier)
  17. if (ier /= 0) then
  18. print *, 'Unable to finalize MPI: ', ier
  19. stop 1
  20. endif
  21. end program mpitest