Program mpitest
IMPLICIT NONE
INCLUDE 'mpif.h'
INTEGER a,ierr,rank,size
CALL MPI_INIT(ierr)
CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
CALL MPI_FINALIZE(ierr)
write(6,1)rank,size
1 format('rank,size=',2I4)
read(5,2)a
2 format(I4)
STOP
END