Skip to content

Questions about mpi_reduce of GROOPS code #178

Answered by tmayerguerr
FFFFFG-IGG asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
The receivers are distributed to the nodes. For example, receiver 0 on node 0, receiver 1 on node 1, and so on. However, the processes do not know on which node the other receivers are. This information is distributed with recvProcess.
In the first loop, the number is only set on the node of the receiver (if(recv->isMyRank())), on all others the value remains 0:

process0: recvProcess[1,0,0,0...]
process1: recvProcess[0,2,0,0...]
process2: recvProcess[0,0,3,0...]
process3: recvProcess[0,0,0,4...]

So the result after reduceSum and broadCast is

process0: recvProcess[1,2,3,4...]
process1: recvProcess[1,2,3,4...]
process2: recvProcess[1,2,3,4...]
process3: recvProcess[1,2,3,4...]

Unused/…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FFFFFG-IGG
Comment options

Answer selected by FFFFFG-IGG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants