diff options
Diffstat (limited to 'meson/test cases/frameworks/17 mpi/main.f90')
-rw-r--r-- | meson/test cases/frameworks/17 mpi/main.f90 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/17 mpi/main.f90 b/meson/test cases/frameworks/17 mpi/main.f90 new file mode 100644 index 000000000..b5666e899 --- /dev/null +++ b/meson/test cases/frameworks/17 mpi/main.f90 @@ -0,0 +1,30 @@ +use, intrinsic :: iso_fortran_env, only: stderr=>error_unit +use mpi + +implicit none + +logical :: flag +integer :: ier + +call MPI_Init(ier) + +if (ier /= 0) then + write(stderr,*) 'Unable to initialize MPI', ier + stop 1 +endif + +call MPI_Initialized(flag, ier) +if (ier /= 0) then + write(stderr,*) 'Unable to check MPI initialization state: ', ier + stop 1 +endif + +call MPI_Finalize(ier) +if (ier /= 0) then + write(stderr,*) 'Unable to finalize MPI: ', ier + stop 1 +endif + +print *, "OK: Fortran MPI" + +end program |