1
1

Fixes for the 2gb limitation. This fixes problems both static and two-phase

algorithms. 

This commit was SVN r27596.
Этот коммит содержится в:
Vishwanath Venkatesan 2012-11-12 17:39:58 +00:00
родитель 58d701fad9
Коммит f91340f648
5 изменённых файлов: 20 добавлений и 17 удалений

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

@ -71,7 +71,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
int i=0,j=0,l=0, temp_index; int i=0,j=0,l=0, temp_index;
int ret=OMPI_SUCCESS, cycles, local_cycles, *bytes_per_process=NULL; int ret=OMPI_SUCCESS, cycles, local_cycles, *bytes_per_process=NULL;
int index, *disp_index=NULL, **blocklen_per_process=NULL; int index, *disp_index=NULL, **blocklen_per_process=NULL;
int *iovec_count_per_process=NULL, *displs=NULL, total_bytes_written=0; int *iovec_count_per_process=NULL, *displs=NULL;
size_t total_bytes_written=0;
MPI_Aint **displs_per_process=NULL, *memory_displacements=NULL; MPI_Aint **displs_per_process=NULL, *memory_displacements=NULL;
MPI_Aint bytes_to_write_in_cycle=0, global_iov_count=0, global_count=0; MPI_Aint bytes_to_write_in_cycle=0, global_iov_count=0, global_count=0;

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

@ -109,7 +109,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
int *count_my_req_procs_ptr, int *count_my_req_procs_ptr,
int **count_my_req_per_proc_ptr, int **count_my_req_per_proc_ptr,
mca_io_ompio_access_array_t **my_req_ptr, mca_io_ompio_access_array_t **my_req_ptr,
int **buf_indices, size_t **buf_indices,
int striping_unit, int striping_unit,
int num_aggregators, int num_aggregators,
int *aggregator_list); int *aggregator_list);

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

@ -53,7 +53,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_start,
OMPI_MPI_OFFSET_TYPE *fd_end, OMPI_MPI_OFFSET_TYPE *fd_end,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
int *buf_idx, int striping_unit, size_t *buf_idx, int striping_unit,
int *aggregator_list); int *aggregator_list);
static int two_phase_exchange_data(mca_io_ompio_file_t *fh, static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
@ -71,7 +71,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
mca_io_ompio_access_array_t *others_req, mca_io_ompio_access_array_t *others_req,
int iter, int iter,
int *buf_idx, MPI_Aint buftype_extent, size_t *buf_idx, MPI_Aint buftype_extent,
int striping_unit, int *aggregator_list); int striping_unit, int *aggregator_list);
@ -120,7 +120,8 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
struct iovec *decoded_iov = NULL, *temp_iov = NULL, *iov = NULL; struct iovec *decoded_iov = NULL, *temp_iov = NULL, *iov = NULL;
size_t max_data = 0, total_bytes = 0; size_t max_data = 0, total_bytes = 0;
int domain_size=0, *count_my_req_per_proc=NULL, count_my_req_procs = 0; int domain_size=0, *count_my_req_per_proc=NULL, count_my_req_procs = 0;
int count_other_req_procs, *buf_indices=NULL; int count_other_req_procs;
size_t *buf_indices=NULL;
int *aggregator_list = NULL, local_count = 0, local_size = 0; int *aggregator_list = NULL, local_count = 0, local_size = 0;
OMPI_MPI_OFFSET_TYPE start_offset = 0, end_offset = 0, fd_size = 0; OMPI_MPI_OFFSET_TYPE start_offset = 0, end_offset = 0, fd_size = 0;
OMPI_MPI_OFFSET_TYPE *start_offsets=NULL, *end_offsets=NULL; OMPI_MPI_OFFSET_TYPE *start_offsets=NULL, *end_offsets=NULL;
@ -507,7 +508,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_start,
OMPI_MPI_OFFSET_TYPE *fd_end, OMPI_MPI_OFFSET_TYPE *fd_end,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
int *buf_idx, int striping_unit, size_t *buf_idx, int striping_unit,
int *aggregator_list){ int *aggregator_list){
@ -817,7 +818,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *fd_end, OMPI_MPI_OFFSET_TYPE *fd_end,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
mca_io_ompio_access_array_t *others_req, mca_io_ompio_access_array_t *others_req,
int iter, int *buf_idx, int iter, size_t *buf_idx,
MPI_Aint buftype_extent, int striping_unit, MPI_Aint buftype_extent, int striping_unit,
int *aggregator_list) int *aggregator_list)
{ {

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

@ -61,7 +61,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_start,
OMPI_MPI_OFFSET_TYPE *fd_end, OMPI_MPI_OFFSET_TYPE *fd_end,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
int *buf_idx, int striping_unit, size_t *buf_idx, int striping_unit,
int *aggregator_list); int *aggregator_list);
@ -84,7 +84,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh,
mca_io_ompio_access_array_t *others_req, mca_io_ompio_access_array_t *others_req,
int *send_buf_idx, int *curr_to_proc, int *send_buf_idx, int *curr_to_proc,
int *done_to_proc, int iter, int *done_to_proc, int iter,
int *buf_idx, MPI_Aint buftype_extent, size_t *buf_idx, MPI_Aint buftype_extent,
int striping_unit, int *aggregator_list, int striping_unit, int *aggregator_list,
int *hole); int *hole);
@ -148,7 +148,8 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
struct iovec *decoded_iov=NULL, *temp_iov=NULL; struct iovec *decoded_iov=NULL, *temp_iov=NULL;
size_t max_data = 0, total_bytes = 0; size_t max_data = 0, total_bytes = 0;
int domain_size=0, *count_my_req_per_proc=NULL, count_my_req_procs; int domain_size=0, *count_my_req_per_proc=NULL, count_my_req_procs;
int count_other_req_procs, *buf_indices, ret=OMPI_SUCCESS; int count_other_req_procs, ret=OMPI_SUCCESS;
size_t *buf_indices=NULL;
int local_count = 0, local_size=0,*aggregator_list = NULL; int local_count = 0, local_size=0,*aggregator_list = NULL;
struct iovec *iov = NULL; struct iovec *iov = NULL;
@ -560,7 +561,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_start,
OMPI_MPI_OFFSET_TYPE *fd_end, OMPI_MPI_OFFSET_TYPE *fd_end,
Flatlist_node *flat_buf, Flatlist_node *flat_buf,
int *buf_idx, int striping_unit, size_t *buf_idx, int striping_unit,
int *aggregator_list) int *aggregator_list)
{ {
@ -907,7 +908,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh,
mca_io_ompio_access_array_t *others_req, mca_io_ompio_access_array_t *others_req,
int *send_buf_idx, int *curr_to_proc, int *send_buf_idx, int *curr_to_proc,
int *done_to_proc, int iter, int *done_to_proc, int iter,
int *buf_idx,MPI_Aint buftype_extent, size_t *buf_idx,MPI_Aint buftype_extent,
int striping_unit, int *aggregator_list, int striping_unit, int *aggregator_list,
int *hole){ int *hole){

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

@ -337,14 +337,14 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
int *count_my_req_procs_ptr, int *count_my_req_procs_ptr,
int **count_my_req_per_proc_ptr, int **count_my_req_per_proc_ptr,
mca_io_ompio_access_array_t **my_req_ptr, mca_io_ompio_access_array_t **my_req_ptr,
int **buf_indices, size_t **buf_indices,
int striping_unit, int striping_unit,
int num_aggregators, int num_aggregators,
int *aggregator_list) int *aggregator_list)
{ {
int *count_my_req_per_proc, count_my_req_procs; int *count_my_req_per_proc, count_my_req_procs;
int *buf_idx; size_t *buf_idx = NULL;
int i, l, proc; int i, l, proc;
OMPI_MPI_OFFSET_TYPE fd_len, rem_len, curr_idx, off; OMPI_MPI_OFFSET_TYPE fd_len, rem_len, curr_idx, off;
mca_io_ompio_access_array_t *my_req; mca_io_ompio_access_array_t *my_req;
@ -362,7 +362,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
count_my_req_per_proc[i] = 0; count_my_req_per_proc[i] = 0;
} }
buf_idx = (int *) malloc (fh->f_size * sizeof(int)); buf_idx = (size_t *) malloc (fh->f_size * sizeof(size_t));
if ( NULL == buf_idx ){ if ( NULL == buf_idx ){
return OMPI_ERR_OUT_OF_RESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
@ -432,7 +432,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
fd_size, fd_start, fd_end, fd_size, fd_start, fd_end,
striping_unit, num_aggregators, striping_unit, num_aggregators,
aggregator_list); aggregator_list);
if (buf_idx[proc] == -1){ if (buf_idx[proc] == (size_t) -1){
buf_idx[proc] = (int) curr_idx; buf_idx[proc] = (int) curr_idx;
} }
l = my_req[proc].count; l = my_req[proc].count;
@ -451,7 +451,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh,
num_aggregators, num_aggregators,
aggregator_list); aggregator_list);
if (buf_idx[proc] == -1){ if (buf_idx[proc] == (size_t) -1){
buf_idx[proc] = (int) curr_idx; buf_idx[proc] = (int) curr_idx;
} }