1
1

part 1 of the fix to get rid of the missing symbols that prevent the sub-modules to be loaded.

Этот коммит содержится в:
Edgar Gabriel 2014-11-29 20:01:36 -06:00
родитель 59b739ee90
Коммит 0758d7570e
11 изменённых файлов: 401 добавлений и 270 удалений

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

@ -112,13 +112,13 @@
** In case the data is not contigous in memory, decode it into an iovec ** ** In case the data is not contigous in memory, decode it into an iovec **
**************************************************************************/ **************************************************************************/
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ret = ompi_io_ompio_decode_datatype (fh, ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&decoded_iov, &decoded_iov,
&iov_count); &iov_count);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
@ -131,10 +131,10 @@
status->_ucount = max_data; status->_ucount = max_data;
} }
mca_io_ompio_get_num_aggregators ( &dynamic_num_io_procs); fh->f_get_num_aggregators ( &dynamic_num_io_procs);
ret = ompi_io_ompio_set_aggregator_props (fh, ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh,
dynamic_num_io_procs, dynamic_num_io_procs,
max_data); max_data);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
@ -147,16 +147,16 @@
goto exit; goto exit;
} }
ret = ompi_io_ompio_allgather_array (&max_data, ret = fh->f_allgather_array (&max_data,
1, 1,
MPI_LONG, MPI_LONG,
total_bytes_per_process, total_bytes_per_process,
1, 1,
MPI_LONG, MPI_LONG,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
@ -173,13 +173,13 @@
/********************************************************************* /*********************************************************************
*** Generate the File offsets/lengths corresponding to this write *** *** Generate the File offsets/lengths corresponding to this write ***
********************************************************************/ ********************************************************************/
ret = ompi_io_ompio_generate_current_file_view (fh, ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh,
max_data, max_data,
&local_iov_array, &local_iov_array,
&local_count); &local_count);
if (ret != OMPI_SUCCESS){ if (ret != OMPI_SUCCESS){
goto exit; goto exit;
} }
@ -197,19 +197,19 @@
goto exit; goto exit;
} }
ret = ompi_io_ompio_allgather_array (&local_count, ret = fh->f_allgather_array (&local_count,
1, 1,
MPI_INT, MPI_INT,
fview_count, fview_count,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
displs = (int*)malloc (fh->f_procs_per_group*sizeof(int)); displs = (int*)malloc (fh->f_procs_per_group*sizeof(int));
@ -249,17 +249,17 @@
} }
} }
ret = ompi_io_ompio_allgatherv_array (local_iov_array, ret = fh->f_allgatherv_array (local_iov_array,
local_count, local_count,
fh->f_iov_type, fh->f_iov_type,
global_iov_array, global_iov_array,
fview_count, fview_count,
displs, displs,
fh->f_iov_type, fh->f_iov_type,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
@ -273,7 +273,7 @@
ret = OMPI_ERR_OUT_OF_RESOURCE; ret = OMPI_ERR_OUT_OF_RESOURCE;
goto exit; goto exit;
} }
ompi_io_ompio_sort_iovec (global_iov_array, total_fview_count, sorted); fh->f_sort_iovec (global_iov_array, total_fview_count, sorted);
} }
if (NULL != local_iov_array) { if (NULL != local_iov_array) {
@ -325,7 +325,7 @@
/* /*
* Calculate how many bytes are read in each cycle * Calculate how many bytes are read in each cycle
*/ */
mca_io_ompio_get_bytes_per_agg ( (int *) &bytes_per_cycle); fh->f_get_bytes_per_agg ( (int *) &bytes_per_cycle);
cycles = ceil((double)total_bytes/bytes_per_cycle); cycles = ceil((double)total_bytes/bytes_per_cycle);
n = 0; n = 0;
@ -845,9 +845,9 @@
else else
nentry.aggregator = 0; nentry.aggregator = 0;
nentry.nprocs_for_coll = dynamic_num_io_procs; nentry.nprocs_for_coll = dynamic_num_io_procs;
if (!ompi_io_ompio_full_print_queue(READ_PRINT_QUEUE)){ if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(READ_PRINT_QUEUE, fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif

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

@ -115,13 +115,13 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
** In case the data is not contigous in memory, decode it into an iovec ** ** In case the data is not contigous in memory, decode it into an iovec **
**************************************************************************/ **************************************************************************/
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ret = ompi_io_ompio_decode_datatype (fh, ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *) fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&decoded_iov, &decoded_iov,
&iov_count); &iov_count);
if (OMPI_SUCCESS != ret ){ if (OMPI_SUCCESS != ret ){
goto exit; goto exit;
} }
@ -134,10 +134,10 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
status->_ucount = max_data; status->_ucount = max_data;
} }
mca_io_ompio_get_num_aggregators ( &dynamic_num_io_procs ); fh->f_get_num_aggregators ( &dynamic_num_io_procs );
ret = ompi_io_ompio_set_aggregator_props (fh, ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh,
dynamic_num_io_procs, dynamic_num_io_procs,
max_data); max_data);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
@ -152,19 +152,19 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
goto exit; goto exit;
} }
ret = ompi_io_ompio_allgather_array (&max_data, ret = fh->f_allgather_array (&max_data,
1, 1,
MPI_LONG, MPI_LONG,
total_bytes_per_process, total_bytes_per_process,
1, 1,
MPI_LONG, MPI_LONG,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if( OMPI_SUCCESS != ret){ if( OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
for (i=0 ; i<fh->f_procs_per_group ; i++) { for (i=0 ; i<fh->f_procs_per_group ; i++) {
total_bytes += total_bytes_per_process[i]; total_bytes += total_bytes_per_process[i];
@ -178,12 +178,12 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
/********************************************************************* /*********************************************************************
*** Generate the File offsets/lengths corresponding to this write *** *** Generate the File offsets/lengths corresponding to this write ***
********************************************************************/ ********************************************************************/
ret = ompi_io_ompio_generate_current_file_view(fh, ret = fh->f_generate_current_file_view( (struct mca_io_ompio_file_t *) fh,
max_data, max_data,
&local_iov_array, &local_iov_array,
&local_count); &local_count);
if (ret != OMPI_SUCCESS){ if (ret != OMPI_SUCCESS){
goto exit; goto exit;
} }
#if DEBUG_ON #if DEBUG_ON
@ -208,19 +208,19 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
goto exit; goto exit;
} }
ret = ompi_io_ompio_allgather_array (&local_count, ret = fh->f_allgather_array (&local_count,
1, 1,
MPI_INT, MPI_INT,
fview_count, fview_count,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if( OMPI_SUCCESS != ret){ if( OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
displs = (int*) malloc (fh->f_procs_per_group * sizeof (int)); displs = (int*) malloc (fh->f_procs_per_group * sizeof (int));
@ -263,19 +263,19 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
} }
ret = ompi_io_ompio_allgatherv_array (local_iov_array, ret = fh->f_allgatherv_array (local_iov_array,
local_count, local_count,
fh->f_iov_type, fh->f_iov_type,
global_iov_array, global_iov_array,
fview_count, fview_count,
displs, displs,
fh->f_iov_type, fh->f_iov_type,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
} }
/* sort it */ /* sort it */
@ -286,17 +286,17 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
ret = OMPI_ERR_OUT_OF_RESOURCE; ret = OMPI_ERR_OUT_OF_RESOURCE;
goto exit; goto exit;
} }
ompi_io_ompio_sort_iovec (global_iov_array, total_fview_count, sorted); fh->f_sort_iovec (global_iov_array, total_fview_count, sorted);
} }
if (NULL != local_iov_array){ if (NULL != local_iov_array){
free(local_iov_array); free(local_iov_array);
local_iov_array = NULL; local_iov_array = NULL;
} }
if (NULL != displs){ if (NULL != displs){
free(displs); free(displs);
displs=NULL; displs=NULL;
} }
@ -341,7 +341,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
} }
mca_io_ompio_get_bytes_per_agg ( (int *)&bytes_per_cycle ); fh->f_get_bytes_per_agg ( (int *)&bytes_per_cycle );
cycles = ceil((double)total_bytes/bytes_per_cycle); cycles = ceil((double)total_bytes/bytes_per_cycle);
@ -983,9 +983,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
else else
nentry.aggregator = 0; nentry.aggregator = 0;
nentry.nprocs_for_coll = dynamic_num_io_procs; nentry.nprocs_for_coll = dynamic_num_io_procs;
if (!ompi_io_ompio_full_print_queue(WRITE_PRINT_QUEUE)){ if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(WRITE_PRINT_QUEUE, fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif

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

@ -38,5 +38,6 @@ mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh,
struct ompi_datatype_t *datatype, struct ompi_datatype_t *datatype,
ompi_status_public_t *status) ompi_status_public_t *status)
{ {
return mca_io_ompio_file_read ( fh->f_fh, buf, count, datatype, status); return fh->f_fh->f_io_selected_module.v2_0_0.
io_module_file_read( fh->f_fh, buf, count, datatype, status);
} }

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

@ -35,5 +35,6 @@ int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh,
struct ompi_datatype_t *datatype, struct ompi_datatype_t *datatype,
ompi_status_public_t *status) ompi_status_public_t *status)
{ {
return mca_io_ompio_file_write (fh->f_fh, buf, count, datatype, status); return fh->f_fh->f_io_selected_module.v2_0_0.
io_module_file_write (fh->f_fh, buf, count, datatype, status);
} }

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

@ -111,13 +111,13 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
/* In case the data is not contigous in memory, decode it into an iovec */ /* In case the data is not contigous in memory, decode it into an iovec */
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ompi_io_ompio_decode_datatype (fh, fh->f_decode_datatype ( (struct mca_io_ompio_file_t *)fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&decoded_iov, &decoded_iov,
&iov_count); &iov_count);
} }
else { else {
max_data = count * datatype->super.size; max_data = count * datatype->super.size;
@ -128,18 +128,18 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
} }
mca_io_ompio_get_num_aggregators ( &static_num_io_procs ); fh->f_get_num_aggregators ( &static_num_io_procs );
ompi_io_ompio_set_aggregator_props (fh, fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh,
static_num_io_procs, static_num_io_procs,
max_data); max_data);
/* printf("max_data %ld\n", max_data); */ /* printf("max_data %ld\n", max_data); */
ret = ompi_io_ompio_generate_current_file_view(fh, ret = fh->f_generate_current_file_view((struct mca_io_ompio_file_t *)fh,
max_data, max_data,
&iov, &iov,
&iov_size); &iov_size);
if (ret != OMPI_SUCCESS){ if (ret != OMPI_SUCCESS){
goto exit; goto exit;
} }
if ( iov_size > 0 ) { if ( iov_size > 0 ) {
@ -195,7 +195,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
/* #########################################################*/ /* #########################################################*/
mca_io_ompio_get_bytes_per_agg ( (int*) &bytes_per_cycle); fh->f_get_bytes_per_agg ( (int*) &bytes_per_cycle);
local_cycles = ceil((double)max_data/bytes_per_cycle); local_cycles = ceil((double)max_data/bytes_per_cycle);
ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles, ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles,
&cycles, &cycles,
@ -276,16 +276,16 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
} }
ret = ompi_io_ompio_allgather_array (&iov_size, ret = fh->f_allgather_array (&iov_size,
1, 1,
MPI_INT, MPI_INT,
iovec_count_per_process, iovec_count_per_process,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if( OMPI_SUCCESS != ret){ if( OMPI_SUCCESS != ret){
goto exit; goto exit;
@ -311,21 +311,21 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
} }
} }
ret = ompi_io_ompio_gatherv_array (local_iov_array, ret = fh->f_gatherv_array (local_iov_array,
iov_size, iov_size,
io_array_type, io_array_type,
global_iov_array, global_iov_array,
iovec_count_per_process, iovec_count_per_process,
displs, displs,
io_array_type, io_array_type,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
fprintf(stderr,"global_iov_array gather error!\n"); fprintf(stderr,"global_iov_array gather error!\n");
goto exit; goto exit;
} }
@ -422,16 +422,16 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
else { else {
bytes_to_read_in_cycle = 0; bytes_to_read_in_cycle = 0;
} }
ompi_io_ompio_gather_array (&bytes_to_read_in_cycle, fh->f_gather_array (&bytes_to_read_in_cycle,
1, 1,
MPI_INT, MPI_INT,
bytes_per_process, bytes_per_process,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) {
receive_buf = &((char*)buf)[position]; receive_buf = &((char*)buf)[position];
@ -898,9 +898,9 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
else else
nentry.aggregator = 0; nentry.aggregator = 0;
nentry.nprocs_for_coll = static_num_io_procs; nentry.nprocs_for_coll = static_num_io_procs;
if (!ompi_io_ompio_full_print_queue(READ_PRINT_QUEUE)){ if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(READ_PRINT_QUEUE, fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif

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

@ -109,13 +109,13 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
/* In case the data is not contigous in memory, decode it into an iovec */ /* In case the data is not contigous in memory, decode it into an iovec */
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ompi_io_ompio_decode_datatype (fh, fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&decoded_iov, &decoded_iov,
&iov_count); &iov_count);
} }
else { else {
max_data = count * datatype->super.size; max_data = count * datatype->super.size;
@ -125,10 +125,10 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
status->_ucount = max_data; status->_ucount = max_data;
} }
mca_io_ompio_get_num_aggregators ( & static_num_io_procs ); fh->f_get_num_aggregators ( & static_num_io_procs );
ompi_io_ompio_set_aggregator_props (fh, fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh,
static_num_io_procs, static_num_io_procs,
max_data); max_data);
/* io_array datatype for using in communication*/ /* io_array datatype for using in communication*/
@ -153,10 +153,10 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
ret = ompi_io_ompio_generate_current_file_view(fh, ret = fh->f_generate_current_file_view((struct mca_io_ompio_file_t *)fh,
max_data, max_data,
&iov, &iov,
&iov_size); &iov_size);
if (ret != OMPI_SUCCESS){ if (ret != OMPI_SUCCESS){
fprintf(stderr,"Current File View Generation Error\n"); fprintf(stderr,"Current File View Generation Error\n");
goto exit; goto exit;
@ -182,7 +182,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
} }
mca_io_ompio_get_bytes_per_agg ( (int *) &bytes_per_cycle); fh->f_get_bytes_per_agg ( (int *) &bytes_per_cycle);
local_cycles = ceil((double)max_data/bytes_per_cycle); local_cycles = ceil((double)max_data/bytes_per_cycle);
@ -267,16 +267,16 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
goto exit; goto exit;
} }
ret = ompi_io_ompio_allgather_array (&iov_size, ret = fh->f_allgather_array (&iov_size,
1, 1,
MPI_INT, MPI_INT,
iovec_count_per_process, iovec_count_per_process,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if( OMPI_SUCCESS != ret){ if( OMPI_SUCCESS != ret){
fprintf(stderr,"iov size allgatherv array!\n"); fprintf(stderr,"iov size allgatherv array!\n");
@ -303,20 +303,20 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
} }
} }
ret = ompi_io_ompio_gatherv_array (local_iov_array, ret = fh->f_gatherv_array (local_iov_array,
iov_size, iov_size,
io_array_type, io_array_type,
global_iov_array, global_iov_array,
iovec_count_per_process, iovec_count_per_process,
displs, displs,
io_array_type, io_array_type,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
fprintf(stderr,"global_iov_array gather error!\n"); fprintf(stderr,"global_iov_array gather error!\n");
goto exit; goto exit;
} }
if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) {
@ -427,16 +427,16 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
*********************************************************/ *********************************************************/
/* gather from each process how many bytes each will be sending */ /* gather from each process how many bytes each will be sending */
ompi_io_ompio_gather_array (&bytes_to_write_in_cycle, fh->f_gather_array (&bytes_to_write_in_cycle,
1, 1,
MPI_INT, MPI_INT,
bytes_per_process, bytes_per_process,
1, 1,
MPI_INT, MPI_INT,
fh->f_aggregator_index, fh->f_aggregator_index,
fh->f_procs_in_group, fh->f_procs_in_group,
fh->f_procs_per_group, fh->f_procs_per_group,
fh->f_comm); fh->f_comm);
/* /*
For each aggregator For each aggregator
@ -901,9 +901,9 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
else else
nentry.aggregator = 0; nentry.aggregator = 0;
nentry.nprocs_for_coll = static_num_io_procs; nentry.nprocs_for_coll = static_num_io_procs;
if (!ompi_io_ompio_full_print_queue(WRITE_PRINT_QUEUE)){ if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(WRITE_PRINT_QUEUE, fh->f_register_print_entry(WRITE_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif

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

@ -143,13 +143,13 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
} }
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ret = ompi_io_ompio_decode_datatype (fh, ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&temp_iov, &temp_iov,
&iov_count); &iov_count);
if (OMPI_SUCCESS != ret ){ if (OMPI_SUCCESS != ret ){
goto exit; goto exit;
} }
@ -179,11 +179,11 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
status->_ucount = max_data; status->_ucount = max_data;
} }
mca_io_ompio_get_num_aggregators (&two_phase_num_io_procs); fh->f_get_num_aggregators (&two_phase_num_io_procs);
if (-1 == two_phase_num_io_procs ){ if (-1 == two_phase_num_io_procs ){
ret = ompi_io_ompio_set_aggregator_props (fh, ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh,
two_phase_num_io_procs, two_phase_num_io_procs,
max_data); max_data);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
return ret; return ret;
} }
@ -207,10 +207,10 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
aggregator_list[i] = i * fh->f_size / two_phase_num_io_procs; aggregator_list[i] = i * fh->f_size / two_phase_num_io_procs;
} }
ret = ompi_io_ompio_generate_current_file_view (fh, ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *)fh,
max_data, max_data,
&iov, &iov,
&local_count); &local_count);
if (OMPI_SUCCESS != ret){ if (OMPI_SUCCESS != ret){
goto exit; goto exit;
@ -481,9 +481,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
nentry.nprocs_for_coll = two_phase_num_io_procs; nentry.nprocs_for_coll = two_phase_num_io_procs;
if (!ompi_io_ompio_full_print_queue(READ_PRINT_QUEUE)){ if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(READ_PRINT_QUEUE, fh->f_register_print_entry(READ_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif
@ -569,7 +569,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
} }
} }
mca_io_ompio_get_bytes_per_agg ( &two_phase_cycle_buffer_size); fh->f_get_bytes_per_agg ( &two_phase_cycle_buffer_size);
ntimes = (int)((end_loc - st_loc + two_phase_cycle_buffer_size)/ ntimes = (int)((end_loc - st_loc + two_phase_cycle_buffer_size)/
two_phase_cycle_buffer_size); two_phase_cycle_buffer_size);

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

@ -174,13 +174,13 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
ret = ompi_io_ompio_decode_datatype (fh, ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh,
datatype, datatype,
count, count,
buf, buf,
&max_data, &max_data,
&temp_iov, &temp_iov,
&iov_count); &iov_count);
if (OMPI_SUCCESS != ret ){ if (OMPI_SUCCESS != ret ){
goto exit; goto exit;
} }
@ -212,11 +212,11 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
status->_ucount = max_data; status->_ucount = max_data;
} }
mca_io_ompio_get_num_aggregators ( &two_phase_num_io_procs ); fh->f_get_num_aggregators ( &two_phase_num_io_procs );
if(-1 == two_phase_num_io_procs){ if(-1 == two_phase_num_io_procs){
ret = ompi_io_ompio_set_aggregator_props (fh, ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh,
two_phase_num_io_procs, two_phase_num_io_procs,
max_data); max_data);
if ( OMPI_SUCCESS != ret){ if ( OMPI_SUCCESS != ret){
return ret; return ret;
} }
@ -244,10 +244,10 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
} }
ret = ompi_io_ompio_generate_current_file_view (fh, ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t*)fh,
max_data, max_data,
&iov, &iov,
&local_count); &local_count);
if ( OMPI_SUCCESS != ret ){ if ( OMPI_SUCCESS != ret ){
@ -529,9 +529,9 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
nentry.aggregator = 0; nentry.aggregator = 0;
} }
nentry.nprocs_for_coll = two_phase_num_io_procs; nentry.nprocs_for_coll = two_phase_num_io_procs;
if (!ompi_io_ompio_full_print_queue(WRITE_PRINT_QUEUE)){ if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){
ompi_io_ompio_register_print_entry(WRITE_PRINT_QUEUE, fh->f_ompio_register_print_entry(WRITE_PRINT_QUEUE,
nentry); nentry);
} }
#endif #endif
@ -622,7 +622,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
} }
} }
mca_io_ompio_get_bytes_per_agg ( &two_phase_cycle_buffer_size ); fh->f_get_bytes_per_agg ( &two_phase_cycle_buffer_size );
ntimes = (int) ((end_loc - st_loc + two_phase_cycle_buffer_size)/two_phase_cycle_buffer_size); ntimes = (int) ((end_loc - st_loc + two_phase_cycle_buffer_size)/two_phase_cycle_buffer_size);
if ((st_loc == -1) && (end_loc == -1)) { if ((st_loc == -1) && (end_loc == -1)) {

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

@ -132,7 +132,7 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh)
} }
} }
int ompi_io_ompio_generate_current_file_view (mca_io_ompio_file_t *fh, int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh,
size_t max_data, size_t max_data,
struct iovec **f_iov, struct iovec **f_iov,
int *iov_count) int *iov_count)
@ -470,7 +470,7 @@ int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh,
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh, int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh,
ompi_datatype_t *datatype, ompi_datatype_t *datatype,
int count, int count,
void *buf, void *buf,
@ -903,7 +903,7 @@ int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_array,
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
int ompi_io_ompio_set_aggregator_props (mca_io_ompio_file_t *fh, int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh,
int num_aggregators, int num_aggregators,
size_t bytes_per_proc) size_t bytes_per_proc)
{ {

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

@ -174,6 +174,99 @@ typedef struct{
int procs_per_contg_group; int procs_per_contg_group;
} contg; } contg;
/*
* Function that takes in a datatype and buffer, and decodes that datatype
* into an iovec using the convertor_raw function
*/
/* forward declaration to keep the compiler happy. */
struct mca_io_ompio_file_t;
typedef int (*mca_io_ompio_decode_datatype_fn_t) (struct mca_io_ompio_file_t *fh,
struct ompi_datatype_t *datatype,
int count,
void *buf,
size_t *max_data,
struct iovec **iov,
uint32_t *iov_count);
typedef int (*mca_io_ompio_generate_current_file_view_fn_t) (struct mca_io_ompio_file_t *fh,
size_t max_data,
struct iovec **f_iov,
int *iov_count);
/*
* Function that sorts an io_array according to the offset by filling
* up an array of the indices into the array (HEAP SORT)
*/
typedef int (*mca_io_ompio_sort_fn_t) (mca_io_ompio_io_array_t *io_array,
int num_entries,
int *sorted);
typedef int (*mca_io_ompio_sort_iovec_fn_t) (struct iovec *iov,
int num_entries,
int *sorted);
/* collective operations based on list of participating ranks instead of communicators*/
typedef int (*mca_io_ompio_allgather_array_fn_t) (void *sbuf,
int scount,
ompi_datatype_t *sdtype,
void *rbuf,
int rcount,
ompi_datatype_t *rdtype,
int root_index,
int *procs_in_group,
int procs_per_group,
ompi_communicator_t *comm);
typedef int (*mca_io_ompio_allgatherv_array_fn_t) (void *sbuf,
int scount,
ompi_datatype_t *sdtype,
void *rbuf,
int *rcounts,
int *disps,
ompi_datatype_t *rdtype,
int root_index,
int *procs_in_group,
int procs_per_group,
ompi_communicator_t *comm);
typedef int (*mca_io_ompio_gather_array_fn_t) (void *sbuf,
int scount,
ompi_datatype_t *sdtype,
void *rbuf,
int rcount,
ompi_datatype_t *rdtype,
int root_index,
int *procs_in_group,
int procs_per_group,
ompi_communicator_t *comm);
typedef int (*mca_io_ompio_gatherv_array_fn_t) (void *sbuf,
int scount,
ompi_datatype_t *sdtype,
void *rbuf,
int *rcounts,
int *disps,
ompi_datatype_t *rdtype,
int root_index,
int *procs_in_group,
int procs_per_group,
ompi_communicator_t *comm);
/* functions to retrieve the number of aggregators and the size of the
temporary buffer on aggregators from the fcoll modules */
typedef void (*mca_io_ompio_get_num_aggregators_fn_t) ( int *num_aggregators);
typedef void (*mca_io_ompio_get_bytes_per_agg_fn_t) ( int *bytes_per_agg);
typedef int (*mca_io_ompio_set_aggregator_props_fn_t) (struct mca_io_ompio_file_t *fh,
int num_aggregators,
size_t bytes_per_proc);
typedef int (*mca_io_ompio_full_print_queue_fn_t) (int queue_type);
typedef int (*mca_io_ompio_register_print_entry_fn_t) (int queue_type,
print_entry x);
/** /**
* Back-end structure for MPI_File * Back-end structure for MPI_File
*/ */
@ -252,6 +345,23 @@ struct mca_io_ompio_file_t {
int *f_init_procs_in_group; int *f_init_procs_in_group;
mca_io_ompio_decode_datatype_fn_t f_decode_datatype;
mca_io_ompio_generate_current_file_view_fn_t f_generate_current_file_view;
mca_io_ompio_sort_fn_t f_sort;
mca_io_ompio_sort_iovec_fn_t f_sort_iovec;
mca_io_ompio_allgather_array_fn_t f_allgather_array;
mca_io_ompio_allgatherv_array_fn_t f_allgatherv_array;
mca_io_ompio_gather_array_fn_t f_gather_array;
mca_io_ompio_gatherv_array_fn_t f_gatherv_array;
mca_io_ompio_get_num_aggregators_fn_t f_get_num_aggregators;
mca_io_ompio_get_bytes_per_agg_fn_t f_get_bytes_per_agg;
mca_io_ompio_set_aggregator_props_fn_t f_set_aggregator_props;
mca_io_ompio_full_print_queue_fn_t f_full_print_queue;
mca_io_ompio_register_print_entry_fn_t f_register_print_entry;
}; };
typedef struct mca_io_ompio_file_t mca_io_ompio_file_t; typedef struct mca_io_ompio_file_t mca_io_ompio_file_t;
@ -374,7 +484,7 @@ OMPI_DECLSPEC int ompio_io_ompio_file_get_position (mca_io_ompio_file_t *fh,
* Function that takes in a datatype and buffer, and decodes that datatype * Function that takes in a datatype and buffer, and decodes that datatype
* into an iovec using the convertor_raw function * into an iovec using the convertor_raw function
*/ */
OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh, OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh,
struct ompi_datatype_t *datatype, struct ompi_datatype_t *datatype,
int count, int count,
void *buf, void *buf,
@ -403,7 +513,7 @@ OMPI_DECLSPEC int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_arr
OMPI_DECLSPEC int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, OMPI_DECLSPEC int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset); OMPI_MPI_OFFSET_TYPE offset);
OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (mca_io_ompio_file_t *fh, OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh,
size_t max_data, size_t max_data,
struct iovec **f_iov, struct iovec **f_iov,
int *iov_count); int *iov_count);
@ -415,7 +525,7 @@ OMPI_DECLSPEC int ompi_io_ompio_generate_groups (mca_io_ompio_file_t *fh,
int **ranks); int **ranks);
/*Aggregator selection methods*/ /*Aggregator selection methods*/
OMPI_DECLSPEC int ompi_io_ompio_set_aggregator_props (mca_io_ompio_file_t *fh, OMPI_DECLSPEC int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh,
int num_aggregators, int num_aggregators,
size_t bytes_per_proc); size_t bytes_per_proc);

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

@ -121,6 +121,25 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm,
ompi_io_ompio_initialize_print_queue(coll_write_time); ompi_io_ompio_initialize_print_queue(coll_write_time);
ompi_io_ompio_initialize_print_queue(coll_read_time); ompi_io_ompio_initialize_print_queue(coll_read_time);
/* set some function pointers required for fcoll, fbtls and sharedfp modules*/
ompio_fh->f_decode_datatype=ompi_io_ompio_decode_datatype;
ompio_fh->f_generate_current_file_view=ompi_io_ompio_generate_current_file_view;
ompio_fh->f_sort=ompi_io_ompio_sort;
ompio_fh->f_sort_iovec=ompi_io_ompio_sort_iovec;
ompio_fh->f_allgather_array=ompi_io_ompio_allgather_array;
ompio_fh->f_allgatherv_array=ompi_io_ompio_allgatherv_array;
ompio_fh->f_gather_array=ompi_io_ompio_gather_array;
ompio_fh->f_gatherv_array=ompi_io_ompio_gatherv_array;
ompio_fh->f_get_num_aggregators=mca_io_ompio_get_num_aggregators;
ompio_fh->f_get_bytes_per_agg=mca_io_ompio_get_bytes_per_agg;
ompio_fh->f_set_aggregator_props=ompi_io_ompio_set_aggregator_props;
ompio_fh->f_full_print_queue=ompi_io_ompio_full_print_queue;
ompio_fh->f_register_print_entry=ompi_io_ompio_register_print_entry;
/* /*
if (MPI_INFO_NULL != info) { if (MPI_INFO_NULL != info) {
ret = ompi_info_dup (info, &ompio_fh->f_info); ret = ompi_info_dup (info, &ompio_fh->f_info);