Discussion:
[OMPI users] MPI_Reduce related questions
MM
2016-10-27 17:35:31 UTC
Permalink
Hello,

Given mpi nodes 0 .... N-1, 0 being root, master node.
and trying to determine the maximum value of a function over a large
range of values of its parameters,

What are the differences between if any:

1. At node i:
evaluate f for each of the values assigned to i of the parameters space.
calculate maximum of f
send this max back to root node, and calculate max of maxes.

2. Assuming all nodes handle the same number of values of the parameters of f:
evaluate f for each....
reduce the array of f results back to root node using the MAX OP for e.g.
at root node, calculate the max of maxes

feels like doing rows then columns vs columns then rows in a matrix.

Basically, what can help me choose?

Performance is always factor 1. If same performance, then code
simplicity comes second

thanks,
MM
2016-11-10 16:01:05 UTC
Permalink
Post by MM
Hello,
Given mpi nodes 0 .... N-1, 0 being root, master node.
and trying to determine the maximum value of a function over a large
range of values of its parameters,
evaluate f for each of the values assigned to i of the parameters space.
calculate maximum of f
send this max back to root node, and calculate max of maxes.
evaluate f for each....
reduce the array of f results back to root node using the MAX OP for e.g.
at root node, calculate the max of maxes
feels like doing rows then columns vs columns then rows in a matrix.
Basically, what aspects can help me choose?
Performance is always factor 1. If same performance, then code
simplicity comes second
thanks,
How can I decide between option 1 and option 2?

Rds,

Loading...