1
1

Changing some of the MPI_ functions to ompi_ equivalents.

This commit was SVN r28342.
Этот коммит содержится в:
Vishwanath Venkatesan 2013-04-17 21:06:36 +00:00
родитель 7a5172a280
Коммит 53753622d4
3 изменённых файлов: 23 добавлений и 21 удалений

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

@ -89,13 +89,14 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
/* array that contains the sorted indices of the global_iov */ /* array that contains the sorted indices of the global_iov */
int *sorted = NULL, *sorted_file_offsets=NULL; int *sorted = NULL, *sorted_file_offsets=NULL;
int *displs = NULL; int *displs = NULL;
size_t max_data = 0; size_t max_data = 0, datatype_size = 0;
int **blocklen_per_process=NULL; int **blocklen_per_process=NULL;
MPI_Aint **displs_per_process=NULL, *memory_displacements=NULL; MPI_Aint **displs_per_process=NULL, *memory_displacements=NULL;
ompi_datatype_t **recvtype = NULL; ompi_datatype_t **recvtype = NULL;
MPI_Aint *total_bytes_per_process = NULL; MPI_Aint *total_bytes_per_process = NULL;
MPI_Request *send_req=NULL, *recv_req=NULL; MPI_Request *send_req=NULL, *recv_req=NULL;
int datatype_size, recv_req_count=0; int recv_req_count=0;
#if TIME_BREAKDOWN #if TIME_BREAKDOWN
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0; double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
@ -745,8 +746,8 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
&recvtype[i]); &recvtype[i]);
ompi_datatype_commit(&recvtype[i]); ompi_datatype_commit(&recvtype[i]);
MPI_Type_size (recvtype[i], ompi_datatype_type_size (recvtype[i],
&datatype_size); &datatype_size);
if (datatype_size){ if (datatype_size){

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

@ -616,7 +616,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh,
off = st_loc; off = st_loc;
for_curr_iter = for_next_iter = 0; for_curr_iter = for_next_iter = 0;
MPI_Type_extent(datatype, &buftype_extent); ompi_datatype_type_extent(datatype, &buftype_extent);
for (m=0; m<ntimes; m++) { for (m=0; m<ntimes; m++) {
@ -924,12 +924,12 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
others_req[i].lens[k] = partial_send[i]; others_req[i].lens[k] = partial_send[i];
} }
MPI_Type_hindexed(count[i], ompi_datatype_create_hindexed(count[i],
&(others_req[i].lens[start_pos[i]]), &(others_req[i].lens[start_pos[i]]),
&(others_req[i].mem_ptrs[start_pos[i]]), &(others_req[i].mem_ptrs[start_pos[i]]),
MPI_BYTE, MPI_BYTE,
&send_type); &send_type);
MPI_Type_commit(&send_type); ompi_datatype_commit(&send_type);
ret = MCA_PML_CALL(isend(MPI_BOTTOM, ret = MCA_PML_CALL(isend(MPI_BOTTOM,
1, 1,
@ -939,7 +939,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh,
MCA_PML_BASE_SEND_STANDARD, MCA_PML_BASE_SEND_STANDARD,
fh->f_comm, fh->f_comm,
requests+nprocs_recv+j)); requests+nprocs_recv+j));
MPI_Type_free(&send_type); free(&send_type);
if (partial_send[i]) others_req[i].lens[k] = tmp; if (partial_send[i]) others_req[i].lens[k] = tmp;
j++; j++;
} }

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

@ -575,7 +575,8 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE st_loc=-1, end_loc=-1, off, done; OMPI_MPI_OFFSET_TYPE st_loc=-1, end_loc=-1, off, done;
OMPI_MPI_OFFSET_TYPE size=0, req_off, len; OMPI_MPI_OFFSET_TYPE size=0, req_off, len;
MPI_Aint buftype_extent; MPI_Aint buftype_extent;
int byte_size, hole; int hole;
size_t byte_size;
#if DEBUG_ON #if DEBUG_ON
int ii,jj; int ii,jj;
@ -584,7 +585,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
char *write_buf=NULL; char *write_buf=NULL;
MPI_Type_size(MPI_BYTE, &byte_size); ompi_datatype_type_size(MPI_BYTE, &byte_size);
for (i = 0; i < fh->f_size; i++){ for (i = 0; i < fh->f_size; i++){
if (others_req[i].count) { if (others_req[i].count) {
@ -688,7 +689,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh,
done = 0; done = 0;
off = st_loc; off = st_loc;
MPI_Type_extent(datatype, &buftype_extent); ompi_datatype_type_extent(datatype, &buftype_extent);
for (m=0;m <ntimes; m++){ for (m=0;m <ntimes; m++){
for (i=0; i< fh->f_size; i++) count[i] = recv_size[i] = 0; for (i=0; i< fh->f_size; i++) count[i] = recv_size[i] = 0;
@ -965,11 +966,11 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh,
tmp_len[i] = others_req[i].lens[k]; tmp_len[i] = others_req[i].lens[k];
others_req[i].lens[k] = partial_recv[i]; others_req[i].lens[k] = partial_recv[i];
} }
MPI_Type_hindexed(count[i], ompi_datatype_create_hindexed(count[i],
&(others_req[i].lens[start_pos[i]]), &(others_req[i].lens[start_pos[i]]),
&(others_req[i].mem_ptrs[start_pos[i]]), &(others_req[i].mem_ptrs[start_pos[i]]),
MPI_BYTE, recv_types+j); MPI_BYTE, recv_types+j);
MPI_Type_commit(recv_types+j); ompi_datatype_commit(recv_types+j);
j++; j++;
} }
} }
@ -1143,7 +1144,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh,
} }
} }
for (i=0; i<nprocs_recv; i++) MPI_Type_free(recv_types+i); for (i=0; i<nprocs_recv; i++) free(recv_types+i);
free(recv_types); free(recv_types);
ret = ompi_request_wait_all (nprocs_send+nprocs_recv, ret = ompi_request_wait_all (nprocs_send+nprocs_recv,
requests, requests,