-static void init_mv2_alltoall_tables_stampede(){
-int i;
- int agg_table_sum = 0;
-mv2_alltoall_tuning_table **table_ptrs = NULL;
- mv2_alltoall_num_ppn_conf = 3;
- mv2_alltoall_thresholds_table
- = malloc(sizeof(mv2_alltoall_tuning_table *)
- * mv2_alltoall_num_ppn_conf);
- table_ptrs = malloc(sizeof(mv2_alltoall_tuning_table *)
- * mv2_alltoall_num_ppn_conf);
- mv2_size_alltoall_tuning_table = malloc(sizeof(int) *
- mv2_alltoall_num_ppn_conf);
- mv2_alltoall_table_ppn_conf =malloc(mv2_alltoall_num_ppn_conf * sizeof(int));
- mv2_alltoall_table_ppn_conf[0] = 1;
- mv2_size_alltoall_tuning_table[0] = 6;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_1ppn[] = {
- {2,
- 1,
- {{0, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {4,
- 2,
- {{0, 262144, &MPIR_Alltoall_Scatter_dest_MV2},
- {262144, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {8,
- 2,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {16,
- 3,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, 512, &MPIR_Alltoall_bruck_MV2},
- {512, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0,-1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 3,
- {{0, 32, &MPIR_Alltoall_RD_MV2},
- {32, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
- };
- table_ptrs[0] = mv2_tmp_alltoall_thresholds_table_1ppn;
- mv2_alltoall_table_ppn_conf[1] = 2;
- mv2_size_alltoall_tuning_table[1] = 6;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_2ppn[] = {
- {4,
- 2,
- {{0, 32, &MPIR_Alltoall_RD_MV2},
- {32, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {8,
- 2,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {16,
- 3,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0,-1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 3,
- {{0, 16, &MPIR_Alltoall_RD_MV2},
- {16, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {128,
- 3,
- {{0, 4, &MPIR_Alltoall_RD_MV2},
- {4, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
- };
- table_ptrs[1] = mv2_tmp_alltoall_thresholds_table_2ppn;
- mv2_alltoall_table_ppn_conf[2] = 16;
- mv2_size_alltoall_tuning_table[2] = 7;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_16ppn[] = {
- {16,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{32768, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{16384, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, 16384, &MPIR_Alltoall_Scatter_dest_MV2},
- {16384, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{32768, 131072, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {128,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384,65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {256,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {512,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
- {1024,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- };
- table_ptrs[2] = mv2_tmp_alltoall_thresholds_table_16ppn;
- agg_table_sum = 0;
- for (i = 0; i < mv2_alltoall_num_ppn_conf; i++) {
- agg_table_sum += mv2_size_alltoall_tuning_table[i];
- }
- mv2_alltoall_thresholds_table[0] =
- malloc(agg_table_sum * sizeof (mv2_alltoall_tuning_table));
- memcpy(mv2_alltoall_thresholds_table[0], table_ptrs[0],
- (sizeof(mv2_alltoall_tuning_table)
- * mv2_size_alltoall_tuning_table[0]));
- for (i = 1; i < mv2_alltoall_num_ppn_conf; i++) {
- mv2_alltoall_thresholds_table[i] =
- mv2_alltoall_thresholds_table[i - 1]
- + mv2_size_alltoall_tuning_table[i - 1];
- memcpy(mv2_alltoall_thresholds_table[i], table_ptrs[i],
- (sizeof(mv2_alltoall_tuning_table)
- * mv2_size_alltoall_tuning_table[i]));
- }
- free(table_ptrs);
-
-
-}
-