* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
int level; /* location of my rank in the tree structure of size */
int delta; /* number of nodes on my level */
int level; /* location of my rank in the tree structure of size */
int delta; /* number of nodes on my level */
* operations.
* Root of this tree is always rank (size-1) and fanout is 2.
* Here are some of the examples of this tree:
* operations.
* Root of this tree is always rank (size-1) and fanout is 2.
* Here are some of the examples of this tree:
- a parent,
- belong to the left subtree, or
- belong to the right subtee
Each of the cases need to be handled differently.
*/
- a parent,
- belong to the left subtree, or
- belong to the right subtee
Each of the cases need to be handled differently.
*/
if (myrank > rchild) {
/* I belong to the left subtree:
- If I am the left child, compute real rank of my parent
if (myrank > rchild) {
/* I belong to the left subtree:
- If I am the left child, compute real rank of my parent
} else {
/* I belong to the right subtree:
- If I am the right child, compute real rank of my parent
} else {
/* I belong to the right subtree:
- If I am the right child, compute real rank of my parent
- - Iterate down through tree:
- compute new size and parent,
+ - Iterate down through tree:
+ compute new size and parent,
if (tree->tree_next[0] >= 0) { tree->tree_nextsize = 1; }
if (tree->tree_next[1] >= 0) { tree->tree_nextsize += 1; }
if (tree->tree_next[0] >= 0) { tree->tree_nextsize = 1; }
if (tree->tree_next[1] >= 0) { tree->tree_nextsize += 1; }
if( remote >= size ) remote -= size;
if (childs==MAXTREEFANOUT) {
XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs);
if( remote >= size ) remote -= size;
if (childs==MAXTREEFANOUT) {
XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs);
ompi_coll_tree_t *bmtree;
int i;
XBT_DEBUG("coll:tuned:topo:build_in_order_bmtree rt %d", root);
ompi_coll_tree_t *bmtree;
int i;
XBT_DEBUG("coll:tuned:topo:build_in_order_bmtree rt %d", root);
childs++;
if (childs == MAXTREEFANOUT) {
XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs);
childs++;
if (childs == MAXTREEFANOUT) {
XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs);
if( srank-1 < (mark * maxchainlen) ) {
column = (srank-1)/maxchainlen;
head = 1+column*maxchainlen;
if( srank-1 < (mark * maxchainlen) ) {
column = (srank-1)/maxchainlen;
head = 1+column*maxchainlen;
XBT_DEBUG("coll:tuned:topo:topo_dump_tree %1d tree root %d"
" fanout %d BM %1d nextsize %d prev %d",
rank, tree->tree_root, tree->tree_bmtree, tree->tree_fanout,
tree->tree_nextsize, tree->tree_prev);
if( tree->tree_nextsize ) {
XBT_DEBUG("coll:tuned:topo:topo_dump_tree %1d tree root %d"
" fanout %d BM %1d nextsize %d prev %d",
rank, tree->tree_root, tree->tree_bmtree, tree->tree_fanout,
tree->tree_nextsize, tree->tree_prev);
if( tree->tree_nextsize ) {
- for( i = 0; i < tree->tree_nextsize; i++ )
- XBT_DEBUG("[%1d] %d", i, tree->tree_next[i]);
+ for (int i = 0; i < tree->tree_nextsize; i++)
+ XBT_DEBUG("[%1d] %d", i, tree->tree_next[i]);