A few more cleanups
This commit was SVN r11135.
Этот коммит содержится в:
родитель
f50aad2721
Коммит
0757dfba42
@ -31,9 +31,11 @@ C the number of times to go around the ring in the message.
|
|||||||
if (rank .eq. 0) then
|
if (rank .eq. 0) then
|
||||||
message = 10
|
message = 10
|
||||||
|
|
||||||
print *, 'Process 0 sending ', message, ' to ', next
|
print *, 'Process 0 sending ', message, ' to ', next, ' tag ',
|
||||||
|
& tag, ' (', size, ' processes in ring)'
|
||||||
call MPI_SEND(message, 1, MPI_INTEGER, next, tag,
|
call MPI_SEND(message, 1, MPI_INTEGER, next, tag,
|
||||||
& MPI_COMM_WORLD, ierr)
|
& MPI_COMM_WORLD, ierr)
|
||||||
|
print *, 'Process 0 sent to ', next
|
||||||
endif
|
endif
|
||||||
|
|
||||||
C Pass the message around the ring. The exit mechanism works as
|
C Pass the message around the ring. The exit mechanism works as
|
||||||
|
@ -30,7 +30,7 @@ program ring
|
|||||||
if (rank .eq. 0) then
|
if (rank .eq. 0) then
|
||||||
message = 10
|
message = 10
|
||||||
|
|
||||||
print *, 'Process 0 sending ', message, ' to ', next
|
print *, 'Process 0 sending ', message, ' to ', next, ' tag ', tag, ' (', size, ' processes in ring)'
|
||||||
call MPI_SEND(message, 1, MPI_INTEGER, next, tag, MPI_COMM_WORLD, ierr)
|
call MPI_SEND(message, 1, MPI_INTEGER, next, tag, MPI_COMM_WORLD, ierr)
|
||||||
print *, 'Process 0 sent to ', next
|
print *, 'Process 0 sent to ', next
|
||||||
endif
|
endif
|
||||||
@ -47,7 +47,7 @@ program ring
|
|||||||
|
|
||||||
if (rank .eq. 0) then
|
if (rank .eq. 0) then
|
||||||
message = message - 1
|
message = message - 1
|
||||||
print *, 'Process 0 decremented num'
|
print *, 'Process 0 decremented value', message
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call MPI_SEND(message, 1, MPI_INTEGER, next, tag, MPI_COMM_WORLD, ierr)
|
call MPI_SEND(message, 1, MPI_INTEGER, next, tag, MPI_COMM_WORLD, ierr)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user