       include 'mpif.h'
       integer numtasks, rank,ierr,rc
       call MPI_INIT(ierr)
       if(ierr.ne.0)then
       print*,'error setting MPI'
       endif
       call mpi_comm_size(mpi_comm_world,numtasks,ierr)
       call mpi_comm_rank(mpi_comm_world,rank,ierr)
       print*,'number of tasks=',numtasks,'my rank=',rank
       call mpi_finalize(ierr)
       stop
       end

