program example1 !--Include the mpi header file use mpi implicit none integer ierr,myid,numprocs integer irc !--Initialize MPI call MPI_INIT( ierr ) !--Who am I? --- get my rank=myid call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) !--How many processes in the global group? call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) print *, "Process ",myid," of ",numprocs," is alive" !--Finalize MPI call MPI_FINALIZE(irc) stop end