From 28110cfe14856420b58ee9b8e87d43074c166813 Mon Sep 17 00:00:00 2001 From: Edgar Solomonik Date: Thu, 9 Nov 2023 14:46:17 -0600 Subject: [PATCH] fix some build warnings --- src/contraction/contraction.cxx | 8 +++++--- src/mapping/node_aware_dist.cxx | 11 +++++------ src/mapping/topology.cxx | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/contraction/contraction.cxx b/src/contraction/contraction.cxx index b5378c3a..865a4f95 100644 --- a/src/contraction/contraction.cxx +++ b/src/contraction/contraction.cxx @@ -4427,8 +4427,10 @@ namespace CTF_int { TAU_FSTOP(pre_ctr_func_barrier); #endif +#ifndef NODE_AWARE #define NODE_AWARE 1 -#ifdef NODE_AWARE +#endif +#if NODE_AWARE /* reorder processor grid to account for node-awareness */ topology orig_topo = *(C->topo); int64_t node_aware_send_to_rank; @@ -4443,7 +4445,7 @@ namespace CTF_int { //std::vector< std::vector > intra_node_grids = CTF_int::get_all_shapes(C->wrld->ppn()){ int * intra_node_lens = (int*)CTF_int::alloc((orig_topo.order)*sizeof(int)); int64_t best_topo_index; - for (int64_t i=0; iunfold(); //B->unfold(); -#ifdef NODE_AWARE +#if NODE_AWARE if (enable_node_aware) { TAU_FSTART(node_aware_backmapping); /* reorder processor grid to account for node-awareness */ diff --git a/src/mapping/node_aware_dist.cxx b/src/mapping/node_aware_dist.cxx index 542e809b..16e23402 100644 --- a/src/mapping/node_aware_dist.cxx +++ b/src/mapping/node_aware_dist.cxx @@ -31,8 +31,8 @@ namespace CTF_int { order = t.order + 1; sgf = t.sgf; ogf = t.ogf; - assert(sgf.size() > pos); - assert(ogf.size() > pos); + assert((int)sgf.size() > pos); + assert((int)ogf.size() > pos); sgf[pos].push_back(el); std::sort(sgf[pos].begin(), sgf[pos].end()); auto it = std::find(ogf[pos].begin(), ogf[pos].end(), el); @@ -41,7 +41,7 @@ namespace CTF_int { } bool find(int pos, int el) { - if (ogf.size() <= pos) { + if ((int)ogf.size() <= pos) { printf("Find problem! order %d, size: %ld, pos: %d, el: %d\n" , order, ogf.size(), pos, el); assert(0); @@ -142,7 +142,6 @@ namespace CTF_int { // 2.) we remove identical branches // 3.) we go to step 1 - size_t b(0); size_t n(rGrid.size()); std::vector treeVec; treeVec.emplace_back(0, nodeGrid, openGridFactors); @@ -169,7 +168,7 @@ namespace CTF_int { // however: if a potential element is already in the list, // do not add it for (size_t t(b); t < e; t++){ - for (auto i(0); i < n; i++) + for (auto i(0); i < (int)n; i++) if ( treeVec[t].find(i, f) ){ bool distinct(true); auto cand = Tree(treeVec[t], i, f); @@ -193,4 +192,4 @@ namespace CTF_int { } return inter_node_grids; } -} \ No newline at end of file +} diff --git a/src/mapping/topology.cxx b/src/mapping/topology.cxx index c0c18b79..42524f22 100644 --- a/src/mapping/topology.cxx +++ b/src/mapping/topology.cxx @@ -101,7 +101,7 @@ namespace CTF_int { CommData cdt, int ppn_, bool activate, - int const * intra_node_lens) : unord_glb_comm(cdt), glb_comm(cdt) { + int const * intra_node_lens) : glb_comm(cdt), unord_glb_comm(cdt) { order = order_; lens = (int*)CTF_int::alloc(order_*sizeof(int)); ppn = ppn_;