program hello use mpi implicit none INTEGER :: ierr,rc,processor_id,no_processors,resultlength character(len=MPI_MAX_PROCESSOR_NAME) :: name !!!!!!!!!!!!!!!!!!!!!!!!!! ! intialization mpi ! !!!!!!!!!!!!!!!!!!!!!!!!!! CALL MPI_INIT(ierr) if (ierr .ne. MPI_SUCCESS) then print *,'Error starting MPI program. Terminating.' call MPI_ABORT(MPI_COMM_WORLD, rc, ierr) end if call MPI_COMM_RANK( MPI_COMM_WORLD,processor_id, ierr ) call MPI_COMM_SIZE( MPI_COMM_WORLD,no_processors, ierr ) !call MPI_GET_PROCESSOR_NAME(name,resultlength,ierr) write(*,'(a,i2,a,i2)')"Hello I am processor with ID ",processor_id," of total number of processors ",no_processors !!!!!!!!!!!!!!!!!!!!!!!!!! ! finalization mpi ! !!!!!!!!!!!!!!!!!!!!!!!!!! CALL MPI_FINALIZE(ierr) end program