Download Sun HPC Software, Linux Edition 2.0, Deployment and User Guide
Transcript
Sun Microsystems, Inc & & & 75 MPI_COMM_WORLD, status, ierr) else call mpi_recv(rbuf, length(ns), MPI_REAL8, nodeID-1, 1, MPI_COMM_WORLD, status, ierr) call mpi_send(sbuf, length(ns), MPI_REAL8, nodeID-1, 1, MPI_COMM_WORLD, ierr) end if C---------------------------------------------C Touch all the data received C---------------------------------------------do i=1,length(ns) answer=answer+rbuf(i) enddo end do time2 = MPI_Wtime() C-------------------------------------------------------C Now subtract all the additional work done above C-------------------------------------------------------do nr=1, nRepeats(ns) const=nr+0.1*nodeID do i=1,length(ns) sbuf(i)=const enddo do i=1,length(ns) answer=answer+rbuf(i) enddo enddo time3 = MPI_Wtime() tottime=2.d0*((time2-time1)-(time3-time2)) if (nodeID .eq. 0) then if (ns .eq. 1) then write(6,'(A)') & ' bytes bandwidth MB/s Answer Latency(sec)' write(6,'(A)') & ' -------- -------------- ----------- ------------' end if tlatency = tottime/nRepeats(ns) bw = length(ns)*8/((tottime)/nRepeats(ns))/(1024*1024) write(6,'(1x,i8,2x,f12.4,3x,f12.0,2x,f12.8)')length(ns)*8, & bw,answer,tlatency end if end do call mpi_finalize(ierr) end