An apparatus for performing a rooted-v collective operation by an operational group of compute nodes in a parallel computer, the apparatus comprising a computer processor, a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions that, when executed by the computer processor, cause the apparatus to carry out the steps of:
- identifying, in source code by a collective algorithm selection optimizing module, a gather operation followed by a rooted-v collective operation;
- replacing, by the collective algorithm selection optimizing module, the gather operation with an allgather operation;
- executing, by the compute nodes, the allgather operation;
- selecting, by each compute node in dependence upon results of the allgather operation, an algorithm for effecting the rooted-v collective operation;
- and
- executing, by each compute node, the rooted-v collective operation with the selected algorithm.