cosmetics

This commit is contained in:
Radovan Bast 2015-08-07 16:52:02 +02:00
parent 19d8491528
commit 56c2891350

View File

@ -1,16 +1,23 @@
program example program example
use mpi use mpi
implicit none implicit none
integer :: ierr, rank, size
integer :: ierr, rank, num_ranks
logical :: test_ok logical :: test_ok
call MPI_INIT(ierr) call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, num_ranks, ierr)
call MPI_FINALIZE(ierr) call MPI_FINALIZE(ierr)
test_ok=(size==2.and.(rank==0.or.rank==1))
test_ok = (num_ranks == 2. and. (rank == 0 .or. rank == 1))
if (test_ok) then if (test_ok) then
if (rank == 0) print *, 'PASSED' if (rank == 0) print *, 'PASSED'
else else
stop "FAILED" stop "FAILED"
endif endif
end program end program