From 24b9ff8c9efb2fdeb4182d22b735c70e74af3060 Mon Sep 17 00:00:00 2001 From: Edgar Solomonik Date: Thu, 9 Nov 2023 15:13:49 -0600 Subject: [PATCH] correct code for cases when number of processors is less than CTF_PPN --- src/contraction/contraction.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contraction/contraction.cxx b/src/contraction/contraction.cxx index 865a4f95..cd162eb9 100644 --- a/src/contraction/contraction.cxx +++ b/src/contraction/contraction.cxx @@ -4441,7 +4441,7 @@ namespace CTF_int { if (C->wrld->ppn != 1 && !is_sparse()){ TAU_FSTART(node_aware_remapping_calc); std::vector pe_grid(orig_topo.lens, orig_topo.lens + orig_topo.order); - std::vector > inter_node_grids = CTF_int::get_inter_node_grids(pe_grid, C->wrld->np/C->wrld->ppn); + std::vector > inter_node_grids = CTF_int::get_inter_node_grids(pe_grid, std::max(1,C->wrld->np/C->wrld->ppn)); //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;