Skip to content

Commit

Permalink
fix some build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
solomonik committed Nov 9, 2023
1 parent 562a560 commit 28110cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/contraction/contraction.cxx
Expand Up @@ -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;
Expand All @@ -4443,7 +4445,7 @@ namespace CTF_int {
//std::vector< std::vector<int> > 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; i<inter_node_grids.size(); i++){
for (int64_t i=0; i<(int64_t)inter_node_grids.size(); i++){
for (int j=0; j<orig_topo.order; j++){
intra_node_lens[j] = orig_topo.lens[j] / inter_node_grids[i][j];
}
Expand Down Expand Up @@ -4580,7 +4582,7 @@ namespace CTF_int {
//A->unfold();
//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 */
Expand Down
11 changes: 5 additions & 6 deletions src/mapping/node_aware_dist.cxx
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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<Tree> treeVec;
treeVec.emplace_back(0, nodeGrid, openGridFactors);
Expand All @@ -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);
Expand All @@ -193,4 +192,4 @@ namespace CTF_int {
}
return inter_node_grids;
}
}
}
2 changes: 1 addition & 1 deletion src/mapping/topology.cxx
Expand Up @@ -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_;
Expand Down

0 comments on commit 28110cf

Please sign in to comment.