From 56c2891350b395b5a91c67efa343aa7ff7f3f808 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Fri, 7 Aug 2015 16:52:02 +0200 Subject: [PATCH] cosmetics --- test/fc_mpi/src/example.f90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/fc_mpi/src/example.f90 b/test/fc_mpi/src/example.f90 index b73e21d..4b602e7 100644 --- a/test/fc_mpi/src/example.f90 +++ b/test/fc_mpi/src/example.f90 @@ -1,16 +1,23 @@ program example + use mpi + implicit none - integer :: ierr, rank, size + + integer :: ierr, rank, num_ranks logical :: test_ok + call MPI_INIT(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) - 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 (rank == 0) print *, 'PASSED' else stop "FAILED" endif + end program