The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
504 B
31 lines
504 B
5 years ago
|
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
|