bring the addproc component up to date with the fileview changes
Этот коммит содержится в:
родитель
8b84da5e35
Коммит
4be20b119f
@ -40,9 +40,11 @@ int mca_sharedfp_addproc_file_open (struct ompi_communicator_t *comm,
|
||||
int ret = OMPI_SUCCESS, err;
|
||||
int rank;
|
||||
struct mca_sharedfp_base_data_t* sh;
|
||||
mca_io_ompio_file_t * shfileHandle;
|
||||
mca_io_ompio_file_t * shfileHandle, *ompio_fh;
|
||||
MPI_Comm newInterComm;
|
||||
struct mca_sharedfp_addproc_data * addproc_data = NULL;
|
||||
mca_io_ompio_data_t *data;
|
||||
|
||||
|
||||
/*-------------------------------------------------*/
|
||||
/*Open the same file again without shared file pointer*/
|
||||
@ -53,6 +55,16 @@ int mca_sharedfp_addproc_file_open (struct ompi_communicator_t *comm,
|
||||
opal_output(0, "mca_sharedfp_addproc_file_open: Error during file open\n");
|
||||
return ret;
|
||||
}
|
||||
shfileHandle->f_fh = fh->f_fh;
|
||||
data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data;
|
||||
ompio_fh = &data->ompio_fh;
|
||||
|
||||
err = mca_io_ompio_set_view_internal (shfileHandle,
|
||||
ompio_fh->f_disp,
|
||||
ompio_fh->f_etype,
|
||||
ompio_fh->f_orig_filetype,
|
||||
ompio_fh->f_datarep,
|
||||
MPI_INFO_NULL);
|
||||
|
||||
/*Memory is allocated here for the sh structure*/
|
||||
if ( mca_sharedfp_addproc_verbose ) {
|
||||
|
@ -58,6 +58,8 @@ int mca_sharedfp_addproc_iread(mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Request to the additional process for the offset*/
|
||||
ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset);
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if( OMPI_SUCCESS == ret ){
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
@ -170,6 +172,7 @@ int mca_sharedfp_addproc_read_ordered_begin(mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Each process now has its own individual offset in recvBUFF*/
|
||||
offset = offsetBuff - sendBuff;
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
|
@ -56,6 +56,8 @@ int mca_sharedfp_addproc_iwrite(mca_io_ompio_file_t *fh,
|
||||
}
|
||||
/* Request the offset to write bytesRequested bytes */
|
||||
ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset);
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if ( OMPI_SUCCESS == ret ) {
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
@ -166,6 +168,7 @@ int mca_sharedfp_addproc_write_ordered_begin(mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Each process now has its own individual offset in recvBUFF*/
|
||||
offset = offsetBuff - sendBuff;
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
|
@ -54,6 +54,8 @@ int mca_sharedfp_addproc_read ( mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Request to the additional process for the offset*/
|
||||
ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset);
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if( OMPI_SUCCESS == ret ){
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
@ -162,6 +164,7 @@ int mca_sharedfp_addproc_read_ordered (mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Each process now has its own individual offset in recvBUFF*/
|
||||
offset = offsetBuff - sendBuff;
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
|
@ -58,6 +58,7 @@ int mca_sharedfp_addproc_write (mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Request the offset to write bytesRequested bytes*/
|
||||
ret = mca_sharedfp_addproc_request_position( sh, bytesRequested, &offset);
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
if ( OMPI_SUCCESS == ret ) {
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
@ -163,6 +164,7 @@ int mca_sharedfp_addproc_write_ordered (mca_io_ompio_file_t *fh,
|
||||
|
||||
/*Each process now has its own individual offset in recvBUFF*/
|
||||
offset = offsetBuff - sendBuff;
|
||||
offset /= sh->sharedfh->f_etype_size;
|
||||
|
||||
if ( mca_sharedfp_addproc_verbose ){
|
||||
opal_output(ompi_sharedfp_base_framework.framework_output,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user