1
1

modify the fcoll components to use the common/ompio print queues

Этот коммит содержится в:
Edgar Gabriel 2016-07-19 09:46:41 -05:00
родитель fe17410943
Коммит 39ae93b87b
10 изменённых файлов: 73 добавлений и 65 удалений

Просмотреть файл

@ -104,7 +104,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh,
double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0;
double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0;
double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
/**************************************************************************
@ -866,9 +866,9 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh,
else
nentry.aggregator = 0;
nentry.nprocs_for_coll = dynamic_num_io_procs;
if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_read_time)){
mca_common_ompio_register_print_entry(fh->f_coll_read_time,
nentry);
}
#endif

Просмотреть файл

@ -108,7 +108,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0;
double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
opal_datatype_type_size ( &datatype->super, &ftype_size );
@ -979,9 +979,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
else
nentry.aggregator = 0;
nentry.nprocs_for_coll = dynamic_num_io_procs;
if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_write_time)){
mca_common_ompio_register_print_entry(fh->f_coll_write_time,
nentry);
}
#endif

Просмотреть файл

@ -104,7 +104,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh,
double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0;
double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0;
double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
/**************************************************************************
@ -866,9 +866,9 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh,
else
nentry.aggregator = 0;
nentry.nprocs_for_coll = dynamic_gen2_num_io_procs;
if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_read_time)){
mca_common_ompio_register_print_entry(fh->f_coll_read_time,
nentry);
}
#endif

Просмотреть файл

@ -152,7 +152,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh,
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0;
double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
@ -470,7 +470,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh,
#if DEBUG_ON
if (my_aggregator == fh->f_rank) {
if (aggregators[i] == fh->f_rank) {
uint32_t tv=0;
for (tv=0 ; tv<total_fview_count ; tv++) {
printf("%d: OFFSET: %lld LENGTH: %ld\n",
@ -591,10 +591,17 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh,
/* Write data for iteration i-1 */
for ( i=0; i<dynamic_gen2_num_io_procs; i++ ) {
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
start_write_time = MPI_Wtime();
#endif
ret = write_init (fh, aggregators[i], aggr_data[i], write_chunksize );
if (OMPI_SUCCESS != ret){
goto exit;
}
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
end_write_time = MPI_Wtime();
write_time += end_write_time - start_write_time;
#endif
if (!aggr_data[i]->prev_sendbuf_is_contiguous && aggr_data[i]->prev_bytes_sent) {
free (aggr_data[i]->prev_send_buf);
@ -617,10 +624,17 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh,
/* Write data for iteration i=cycles-1 */
for ( i=0; i<dynamic_gen2_num_io_procs; i++ ) {
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
start_write_time = MPI_Wtime();
#endif
ret = write_init (fh, aggregators[i], aggr_data[i], write_chunksize );
if (OMPI_SUCCESS != ret){
goto exit;
}
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
end_write_time = MPI_Wtime();
write_time += end_write_time - start_write_time;
#endif
if (!aggr_data[i]->prev_sendbuf_is_contiguous && aggr_data[i]->prev_bytes_sent) {
free (aggr_data[i]->prev_send_buf);
@ -635,14 +649,15 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh,
nentry.time[0] = write_time;
nentry.time[1] = comm_time;
nentry.time[2] = exch_write;
if (my_aggregator == fh->f_rank)
nentry.aggregator = 0;
for ( i=0; i<dynamic_gen2_num_io_procs; i++ ) {
if (aggregators[i] == fh->f_rank)
nentry.aggregator = 1;
else
nentry.aggregator = 0;
}
nentry.nprocs_for_coll = dynamic_gen2_num_io_procs;
if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_write_time)){
mca_common_ompio_register_print_entry(fh->f_coll_write_time,
nentry);
}
#endif
@ -725,19 +740,12 @@ static int write_init (mca_io_ompio_file_t *fh, int aggregator, mca_io_ompio_agg
aggr_data->prev_num_io_entries,
&last_array_pos, &last_pos,
write_chunksize );
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
start_write_time = MPI_Wtime();
#endif
if ( 0 > fh->f_fbtl->fbtl_pwritev (fh)) {
free ( aggr_data->prev_io_array);
opal_output (1, "dynamic_gen2_write_all: fbtl_pwritev failed\n");
ret = OMPI_ERROR;
goto exit;
}
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
end_write_time = MPI_Wtime();
write_time += end_write_time - start_write_time;
#endif
}
free ( fh->f_io_array );
free ( aggr_data->prev_io_array);
@ -1087,9 +1095,9 @@ static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_i
printf("%d : global_count : %ld, bytes_sent : %d\n",
rank,global_count, bytes_sent);
#endif
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
start_comm_time = MPI_Wtime();
#endif
//#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
// start_comm_time = MPI_Wtime();
//#endif
/*************************************************************************
*** 7e. Perform the actual communication
*************************************************************************/
@ -1198,10 +1206,10 @@ static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_i
}
#endif
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
end_comm_time = MPI_Wtime();
comm_time += (end_comm_time - start_comm_time);
#endif
//#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
// end_comm_time = MPI_Wtime();
// comm_time += (end_comm_time - start_comm_time);
//#endif
/**********************************************************
*** 7f. Create the io array, and pass it to fbtl
*********************************************************/

Просмотреть файл

@ -103,7 +103,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0;
double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0;
double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
#if DEBUG_ON
MPI_Aint gc_in;
@ -919,9 +919,9 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
else
nentry.aggregator = 0;
nentry.nprocs_for_coll = static_num_io_procs;
if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_read_time)){
mca_common_ompio_register_print_entry(fh->f_coll_read_time,
nentry);
}
#endif

Просмотреть файл

@ -104,7 +104,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0;
double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0;
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
@ -952,9 +952,9 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
else
nentry.aggregator = 0;
nentry.nprocs_for_coll = static_num_io_procs;
if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_write_time)){
mca_common_ompio_register_print_entry(fh->f_coll_write_time,
nentry);
}
#endif

Просмотреть файл

@ -140,7 +140,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
Flatlist_node *flat_buf=NULL;
mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL;
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
// if (opal_datatype_is_predefined(&datatype->super)) {
// fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY;
@ -479,9 +479,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
nentry.nprocs_for_coll = two_phase_num_io_procs;
if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_read_time)){
mca_common_ompio_register_print_entry(fh->f_coll_read_time,
nentry);
}
#endif

Просмотреть файл

@ -168,7 +168,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL;
MPI_Aint send_buf_addr;
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
mca_io_ompio_print_entry nentry;
mca_common_ompio_print_entry nentry;
#endif
@ -543,9 +543,9 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
nentry.aggregator = 0;
}
nentry.nprocs_for_coll = two_phase_num_io_procs;
if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry);
if (!mca_common_ompio_full_print_queue(fh->f_coll_write_time)){
mca_common_ompio_register_print_entry(fh->f_coll_write_time,
nentry);
}
#endif

Просмотреть файл

@ -64,7 +64,7 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info;
#define QUEUESIZE 2048
#define MCA_IO_DEFAULT_FILE_VIEW_SIZE 4*1024*1024
#define OMPIO_FCOLL_WANT_TIME_BREAKDOWN 0
#define OMPIO_FCOLL_WANT_TIME_BREAKDOWN 1
#define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a))
@ -289,8 +289,8 @@ struct mca_io_ompio_file_t {
mca_sharedfp_base_module_t *f_sharedfp;
/* Timing information */
mca_common_ompio_print_queue *f_coll_write_queue;
mca_common_ompio_print_queue *f_coll_read_queue;
mca_common_ompio_print_queue *f_coll_write_time;
mca_common_ompio_print_queue *f_coll_read_time;
/*initial list of aggregators and groups*/
int *f_init_aggr_list;

Просмотреть файл

@ -131,8 +131,8 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm,
ompio_fh->f_split_coll_in_use = false;
/*Initialize the print_queues queues here!*/
mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_write_queue);
mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_read_queue);
mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_write_time);
mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_read_time);
/* set some function pointers required for fcoll, fbtls and sharedfp modules*/
ompio_fh->f_decode_datatype=ompi_io_ompio_decode_datatype;
@ -286,8 +286,8 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh)
if(mca_io_ompio_coll_timing_info){
strcpy (name, "WRITE");
if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_write_queue)){
ret = mca_common_ompio_print_time_info(ompio_fh->f_coll_write_queue,
if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_write_time)){
ret = mca_common_ompio_print_time_info(ompio_fh->f_coll_write_time,
name,
ompio_fh);
if (OMPI_SUCCESS != ret){
@ -296,8 +296,8 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh)
}
strcpy (name, "READ");
if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_read_queue)){
ret = mca_common_ompio_print_time_info(ompio_fh->f_coll_read_queue,
if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_read_time)){
ret = mca_common_ompio_print_time_info(ompio_fh->f_coll_read_time,
name,
ompio_fh);
if (OMPI_SUCCESS != ret){
@ -368,14 +368,14 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh)
}
if ( NULL != ompio_fh->f_coll_write_queue ) {
free ( ompio_fh->f_coll_write_queue );
ompio_fh->f_coll_write_queue = NULL;
if ( NULL != ompio_fh->f_coll_write_time ) {
free ( ompio_fh->f_coll_write_time );
ompio_fh->f_coll_write_time = NULL;
}
if ( NULL != ompio_fh->f_coll_read_queue ) {
free ( ompio_fh->f_coll_read_queue );
ompio_fh->f_coll_read_queue = NULL;
if ( NULL != ompio_fh->f_coll_read_time ) {
free ( ompio_fh->f_coll_read_time );
ompio_fh->f_coll_read_time = NULL;
}
if (MPI_DATATYPE_NULL != ompio_fh->f_iov_type) {