1
1

1. Removing the allgather_array based on the flag UNIFORM FVIEW. This is not really and optimization.

2. Fixing some of the debug printf's these are outdated.

This commit was SVN r28591.
Этот коммит содержится в:
Vishwanath Venkatesan 2013-06-05 21:30:15 +00:00
родитель 713e3aa3db
Коммит 55878674d7
2 изменённых файлов: 40 добавлений и 73 удалений

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

@ -143,6 +143,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
goto exit;
}
}
if (-1 == mca_fcoll_dynamic_num_io_procs) {
mca_fcoll_dynamic_num_io_procs = 1;
}
@ -195,13 +196,10 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
#if DEBUG_ON
for (i=0 ; i<local_count ; i++) {
printf("Local offset-length pair for rank:%d \n",
fh->f_rank);
printf("%d: OFFSET: %p LENGTH: %lld\n",
fh->f_rank,
iov[i].iov_base,
iov[i].iov_len);
printf("%d: OFFSET: %d LENGTH: %ld\n",
fh->f_rank,
local_iov_array[i].iov_base,
local_iov_array[i].iov_len);
}
#endif
@ -247,6 +245,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
}
#if DEBUG_ON
printf("total_fview_count : %d\n", total_fview_count);
if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) {
for (i=0 ; i<fh->f_procs_per_group ; i++) {
printf ("%d: PROCESS: %d ELEMENTS: %d DISPLS: %d\n",
@ -270,37 +269,20 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
}
}
if (fh->f_flags & OMPIO_UNIFORM_FVIEW) {
ret = ompi_io_ompio_allgather_array (local_iov_array,
local_count,
fh->f_iov_type,
global_iov_array,
local_count,
fh->f_iov_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
if (OMPI_SUCCESS != ret){
goto exit;
}
}
else {
ret = ompi_io_ompio_allgatherv_array (local_iov_array,
local_count,
fh->f_iov_type,
global_iov_array,
fview_count,
displs,
fh->f_iov_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
if (OMPI_SUCCESS != ret){
goto exit;
}
ret = ompi_io_ompio_allgatherv_array (local_iov_array,
local_count,
fh->f_iov_type,
global_iov_array,
fview_count,
displs,
fh->f_iov_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
if (OMPI_SUCCESS != ret){
goto exit;
}
/* sort it */
@ -331,8 +313,8 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
for (tv=0 ; tv<total_fview_count ; tv++) {
printf("%d: OFFSET: %lld LENGTH: %ld\n",
fh->f_rank,
global_iov_array[sorted[tv]].offset,
global_iov_array[sorted[tv]].length);
global_iov_array[sorted[tv]].iov_base,
global_iov_array[sorted[tv]].iov_len);
}
}
#endif
@ -702,7 +684,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
index+1,fh->f_rank);
for (i=0;i<fh->f_procs_per_group; i++){
for(j=0;j<disp_index[i];j++){
if (blocklen[i][j] > 0){
if (blocklen_per_process[i][j] > 0){
printf("%d sends blocklen[%d]: %d, disp[%d]: %ld to %d\n",
fh->f_procs_in_group[i],j,
blocklen_per_process[i][j],j,

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

@ -163,15 +163,15 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
goto exit;
}
/* printf("max_data %ld\n", max_data); */
local_iov_array = (local_io_array *)malloc (iov_size * sizeof(local_io_array));
if ( NULL == local_iov_array){
if (0 != iov_size){
local_iov_array = (local_io_array *)malloc (iov_size * sizeof(local_io_array));
if ( NULL == local_iov_array){
fprintf(stderr,"local_iov_array allocation error\n");
ret = OMPI_ERR_OUT_OF_RESOURCE;
goto exit;
}
}
for (j=0; j < iov_size; j++){
local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)
iov[j].iov_base;
@ -307,35 +307,20 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
}
}
if (fh->f_flags & OMPIO_UNIFORM_FVIEW) {
ret = ompi_io_ompio_gather_array (local_iov_array,
iov_size,
io_array_type,
global_iov_array,
iov_size,
io_array_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
}
else {
ret = ompi_io_ompio_gatherv_array (local_iov_array,
iov_size,
io_array_type,
global_iov_array,
iovec_count_per_process,
displs,
io_array_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
}
ret = ompi_io_ompio_gatherv_array (local_iov_array,
iov_size,
io_array_type,
global_iov_array,
iovec_count_per_process,
displs,
io_array_type,
fh->f_aggregator_index,
fh->f_procs_in_group,
fh->f_procs_per_group,
fh->f_comm);
if (OMPI_SUCCESS != ret){
fprintf(stderr,"global_iov_array gather error!\n");
goto exit;
fprintf(stderr,"global_iov_array gather error!\n");
goto exit;
}
if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) {