Commit 34ed9c72 authored by Richard Zamora's avatar Richard Zamora
Browse files

allowing cb_list to be reversed (for easy comparison)

parent c97ba0c7
......@@ -454,14 +454,12 @@ int main( int argc, char* argv[] )
// Define agg_array
char agg_array[256];
get_cb_config_list ( data_size, offset_size, num_chunks, &agg_array[0], agg_size, agg_count );
if (rank==0) printf("Aggregator List:\n%s\n", agg_array);
MPI_Barrier(comm);
free(data_size);
free(offset_size);
//sprintf(agg_array, "TEST_STRING");
//if (rank == 0) printf("agg_array is :%s:\n",agg_array);
// Set the MPIO cb_config_list Hint
MPI_Info_create(&mpiHints);
MPI_Info_set(mpiHints, "cb_config_list", agg_array);
......
......@@ -336,6 +336,7 @@ int get_cb_config_list ( int64_t* data_lens, int64_t* offsets, int data_len, cha
int64_t total_data_size_l;
char name[MPI_MAX_PROCESSOR_NAME];
char name_buf[MPI_MAX_PROCESSOR_NAME];
char* cb_reverse = getenv("HDF5_CB_REV");
MPI_Comm aggr_comm;
MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
......@@ -365,6 +366,16 @@ int get_cb_config_list ( int64_t* data_lens, int64_t* offsets, int data_len, cha
// Generate topology-aware list of aggregators
int* agg_list = (int *) calloc (nprocs, sizeof (int));
topology_aware_list_serial( data_to_send_per_aggr, nb_aggr, agg_list );
if ( cb_reverse && (strcmp(cb_reverse,"yes") == 0) ) {
// Reverse the order of the agg list...
for (i=0, r=nb_aggr-1; i<r; i++,r--) {
int tmp0 = agg_list[i];
agg_list[i] = agg_list[r];
agg_list[r] = tmp0;
}
}
for ( r = 0; r < nb_aggr; r++ ) {
if (rank==0) printf("agg_list[%d] = %d\n",r,agg_list[r]);
strcpy(name_buf, name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment