HP-MPI User's Guide (11th Edition)
Example applications
send_receive.f
Appendix A224
st_source = status(MPI_SOURCE)
st_tag = status(MPI_TAG)
print *, 'Status info: source = ', st_source,
+ ' tag = ', st_tag, ' count = ', st_count
print *, rank, ' received', (data(i),i=1,10)
endif
call MPI_Finalize(ierr)
stop
end
send_receive output
The output from running the send_receive executable is shown below.
The application was run with -np = 10.
Process 0 of 10 is alive
Process 1 of 10 is alive
Process 2 of 10 is alive
Process 3 of 10 is alive
Process 4 of 10 is alive
Process 5 of 10 is alive
Process 6 of 10 is alive
Process 7 of 10 is alive
Process 8 of 10 is alive
Process 9 of 10 is alive
Status info: source = 0 tag = 2001 count = 10
9 received 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.