1
1

Merge pull request #823 from edgargabriel/topic/sharedfp-fview-fix

Topic/sharedfp fview fix
Этот коммит содержится в:
Edgar Gabriel 2015-08-20 11:00:03 -05:00
родитель bcc10fbcd4 4be20b119f
Коммит b8c6466741
18 изменённых файлов: 198 добавлений и 127 удалений

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

@ -106,7 +106,7 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh)
{
if (NULL != fh) {
ompi_datatype_t *types[2], *default_file_view;
ompi_datatype_t *types[2];
int blocklen[2] = {1, 1};
OPAL_PTRDIFF_TYPE d[2], base;
int i;
@ -132,26 +132,20 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh)
fh->f_init_num_aggrs = -1;
fh->f_init_aggr_list = NULL;
ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE,
&ompi_mpi_byte.dt,
&default_file_view);
ompi_datatype_commit (&default_file_view);
fh->f_etype = &ompi_mpi_byte.dt;
fh->f_filetype = default_file_view;
ompi_datatype_duplicate ( &ompi_mpi_byte.dt, &fh->f_orig_filetype );
/* Default file View */
fh->f_iov_type = MPI_DATATYPE_NULL;
fh->f_stripe_size = mca_io_ompio_bytes_per_agg;
/*Decoded iovec of the file-view*/
fh->f_decoded_iov = NULL;
fh->f_etype = NULL;
fh->f_filetype = NULL;
fh->f_orig_filetype = NULL;
mca_io_ompio_set_view_internal(fh,
0,
&ompi_mpi_byte.dt,
default_file_view,
&ompi_mpi_byte.dt,
"native",
fh->f_info);

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

@ -54,13 +54,13 @@ mca_io_ompio_file_open (ompi_communicator_t *comm,
}
/*save pointer back to the file_t structure */
data->ompio_fh.f_fh = fh;
ret = ompio_io_ompio_file_open(comm,filename,amode,info,&data->ompio_fh,use_sharedfp);
if ( OMPI_SUCCESS == ret ) {
fh->f_flags |= OMPIO_FILE_IS_OPEN;
/*save pointer back to the file_t structure */
data->ompio_fh.f_fh = fh;
}

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

@ -28,6 +28,7 @@
#include "ompi/mca/fs/base/base.h"
#include "ompi/mca/fcoll/fcoll.h"
#include "ompi/mca/fcoll/base/base.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/pml/pml.h"
#include "opal/datatype/opal_convertor.h"
#include "ompi/datatype/ompi_datatype.h"
@ -53,98 +54,19 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh,
int num_groups = 0;
contg *contg_groups;
MPI_Aint lb,ub;
fh->f_iov_count = 0;
fh->f_disp = disp;
fh->f_offset = disp;
fh->f_total_bytes = 0;
ompi_io_ompio_decode_datatype (fh,
filetype,
1,
NULL,
&max_data,
&fh->f_decoded_iov,
&fh->f_iov_count);
opal_datatype_get_extent(&filetype->super, &lb, &fh->f_view_extent);
opal_datatype_type_ub (&filetype->super, &ub);
opal_datatype_type_size (&etype->super, &fh->f_etype_size);
opal_datatype_type_size (&filetype->super, &fh->f_view_size);
ompi_datatype_duplicate (etype, &fh->f_etype);
ompi_datatype_duplicate (filetype, &fh->f_filetype);
fh->f_cc_size = get_contiguous_chunk_size (fh);
if (opal_datatype_is_contiguous_memory_layout(&etype->super,1)) {
if (opal_datatype_is_contiguous_memory_layout(&filetype->super,1) &&
fh->f_view_extent == (OPAL_PTRDIFF_TYPE)fh->f_view_size ) {
fh->f_flags |= OMPIO_CONTIGUOUS_FVIEW;
}
}
contg_groups = (contg*) calloc ( 1, fh->f_size * sizeof(contg));
if (NULL == contg_groups) {
opal_output (1, "OUT OF MEMORY\n");
return OMPI_ERR_OUT_OF_RESOURCE;
}
for( i = 0; i < fh->f_size; i++){
contg_groups[i].procs_in_contg_group = (int*)calloc (1,fh->f_size * sizeof(int));
if(NULL == contg_groups[i].procs_in_contg_group){
int j;
opal_output (1, "OUT OF MEMORY\n");
for(j=0; j<i; j++) {
free(contg_groups[j].procs_in_contg_group);
}
free(contg_groups);
return OMPI_ERR_OUT_OF_RESOURCE;
}
}
if( OMPI_SUCCESS != mca_io_ompio_fview_based_grouping(fh,
&num_groups,
contg_groups)){
opal_output(1, "mca_io_ompio_fview_based_grouping() failed\n");
free(contg_groups);
return OMPI_ERROR;
}
if( !( (fh->f_comm->c_flags & OMPI_COMM_CART) &&
(num_groups == 1 || num_groups == fh->f_size)) ) {
mca_io_ompio_finalize_initial_grouping(fh,
num_groups,
contg_groups);
}
for( i = 0; i < fh->f_size; i++){
free(contg_groups[i].procs_in_contg_group);
}
free(contg_groups);
return OMPI_SUCCESS;
}
int mca_io_ompio_file_set_view (ompi_file_t *fp,
OMPI_MPI_OFFSET_TYPE disp,
ompi_datatype_t *etype,
ompi_datatype_t *filetype,
char *datarep,
ompi_info_t *info)
{
mca_io_ompio_data_t *data;
mca_io_ompio_file_t *fh;
size_t ftype_size;
OPAL_PTRDIFF_TYPE ftype_extent, lb;
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
fh = &data->ompio_fh;
OPAL_PTRDIFF_TYPE ftype_extent, lb, ub;
ompi_datatype_t *newfiletype;
if ( NULL != fh->f_etype ) {
ompi_datatype_destroy (&fh->f_etype);
}
if ( NULL != fh->f_filetype ) {
ompi_datatype_destroy (&fh->f_filetype);
}
if ( NULL != fh->f_orig_filetype ) {
ompi_datatype_destroy (&fh->f_orig_filetype);
}
if (NULL != fh->f_decoded_iov) {
free (fh->f_decoded_iov);
fh->f_decoded_iov = NULL;
@ -168,30 +90,90 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp,
if ( etype == filetype &&
ompi_datatype_is_predefined (filetype ) &&
ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){
ompi_datatype_t *newfiletype;
ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE,
&ompi_mpi_byte.dt,
&newfiletype);
ompi_datatype_commit (&newfiletype);
mca_io_ompio_set_view_internal (fh,
disp,
etype,
newfiletype,
datarep,
info);
ompi_datatype_destroy ( &newfiletype );
}
else {
mca_io_ompio_set_view_internal (fh,
disp,
etype,
filetype,
datarep,
info);
newfiletype = filetype;
}
if (OMPI_SUCCESS != mca_fcoll_base_file_select (&data->ompio_fh,
NULL)) {
fh->f_iov_count = 0;
fh->f_disp = disp;
fh->f_offset = disp;
fh->f_total_bytes = 0;
ompi_io_ompio_decode_datatype (fh,
newfiletype,
1,
NULL,
&max_data,
&fh->f_decoded_iov,
&fh->f_iov_count);
opal_datatype_get_extent(&newfiletype->super, &lb, &fh->f_view_extent);
opal_datatype_type_ub (&newfiletype->super, &ub);
opal_datatype_type_size (&etype->super, &fh->f_etype_size);
opal_datatype_type_size (&newfiletype->super, &fh->f_view_size);
ompi_datatype_duplicate (etype, &fh->f_etype);
ompi_datatype_duplicate (newfiletype, &fh->f_filetype);
fh->f_cc_size = get_contiguous_chunk_size (fh);
if (opal_datatype_is_contiguous_memory_layout(&etype->super,1)) {
if (opal_datatype_is_contiguous_memory_layout(&filetype->super,1) &&
fh->f_view_extent == (OPAL_PTRDIFF_TYPE)fh->f_view_size ) {
fh->f_flags |= OMPIO_CONTIGUOUS_FVIEW;
}
}
contg_groups = (contg*) calloc ( 1, fh->f_size * sizeof(contg));
if (NULL == contg_groups) {
opal_output (1, "OUT OF MEMORY\n");
return OMPI_ERR_OUT_OF_RESOURCE;
}
for( i = 0; i < fh->f_size; i++){
contg_groups[i].procs_in_contg_group = (int*)calloc (1,fh->f_size * sizeof(int));
if(NULL == contg_groups[i].procs_in_contg_group){
int j;
opal_output (1, "OUT OF MEMORY\n");
for(j=0; j<i; j++) {
free(contg_groups[j].procs_in_contg_group);
}
free(contg_groups);
return OMPI_ERR_OUT_OF_RESOURCE;
}
}
if( OMPI_SUCCESS != mca_io_ompio_fview_based_grouping(fh,
&num_groups,
contg_groups)){
opal_output(1, "mca_io_ompio_fview_based_grouping() failed\n");
free(contg_groups);
return OMPI_ERROR;
}
if( !( (fh->f_comm->c_flags & OMPI_COMM_CART) &&
(num_groups == 1 || num_groups == fh->f_size)) ) {
mca_io_ompio_finalize_initial_grouping(fh,
num_groups,
contg_groups);
}
for( i = 0; i < fh->f_size; i++){
free(contg_groups[i].procs_in_contg_group);
}
free(contg_groups);
if ( etype == filetype &&
ompi_datatype_is_predefined (filetype ) &&
ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){
ompi_datatype_destroy ( &newfiletype );
}
if (OMPI_SUCCESS != mca_fcoll_base_file_select (fh, NULL)) {
opal_output(1, "mca_fcoll_base_file_select() failed\n");
return OMPI_ERROR;
}
@ -199,6 +181,34 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp,
return OMPI_SUCCESS;
}
int mca_io_ompio_file_set_view (ompi_file_t *fp,
OMPI_MPI_OFFSET_TYPE disp,
ompi_datatype_t *etype,
ompi_datatype_t *filetype,
char *datarep,
ompi_info_t *info)
{
int ret=OMPI_SUCCESS;
mca_io_ompio_data_t *data;
mca_io_ompio_file_t *fh;
mca_io_ompio_file_t *sh;
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
/* we need to call the internal file set view twice: once for the individual
file pointer, once for the shared file pointer (if it is existent)
*/
fh = &data->ompio_fh;
ret = mca_io_ompio_set_view_internal(fh, disp, etype, filetype, datarep, info);
if ( NULL != fh->f_sharedfp_data) {
sh = ((struct mca_sharedfp_base_data_t *)fh->f_sharedfp_data)->sharedfh;
ret = mca_io_ompio_set_view_internal(sh, disp, etype, filetype, datarep, info);
}
return ret;
}
int mca_io_ompio_file_get_view (struct ompi_file_t *fp,
OMPI_MPI_OFFSET_TYPE *disp,
struct ompi_datatype_t **etype,

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

@ -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,

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

@ -44,7 +44,8 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
int handle, rank;
struct mca_sharedfp_lockedfile_data * module_data = NULL;
struct mca_sharedfp_base_data_t* sh;
mca_io_ompio_file_t * shfileHandle;
mca_io_ompio_file_t * shfileHandle, *ompio_fh;
mca_io_ompio_data_t *data;
/*------------------------------------------------------------*/
/*Open the same file again without shared file pointer support*/
@ -56,6 +57,16 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
return err;
}
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*/
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));

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

@ -73,6 +73,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -196,6 +198,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

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

@ -71,6 +71,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -193,6 +195,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

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

@ -68,6 +68,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if (-1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -182,6 +184,7 @@ int mca_sharedfp_lockedfile_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_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

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

@ -70,6 +70,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh,
/* Request the offset to write bytesRequested bytes */
ret = mca_sharedfp_lockedfile_request_position ( sh, bytesRequested, &offset);
offset /= sh->sharedfh->f_etype_size;
if (-1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -187,6 +189,7 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

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

@ -52,11 +52,12 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
int err = OMPI_SUCCESS;
struct mca_sharedfp_base_data_t* sh;
struct mca_sharedfp_sm_data * sm_data = NULL;
mca_io_ompio_file_t * shfileHandle;
mca_io_ompio_file_t * shfileHandle, *ompio_fh;
char * filename_basename;
char * sm_filename;
struct mca_sharedfp_sm_offset * sm_offset_ptr;
struct mca_sharedfp_sm_offset sm_offset;
mca_io_ompio_data_t *data;
int sm_fd;
int rank;
@ -75,6 +76,15 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
return err;
}
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_sm_verbose ) {

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

@ -70,6 +70,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh,
}
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_sm_verbose ) {
@ -193,6 +194,8 @@ int mca_sharedfp_sm_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_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset);

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

@ -70,6 +70,7 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh,
}
/* Request the offset to write bytesRequested bytes */
ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_sm_verbose ) {
@ -194,6 +195,8 @@ int mca_sharedfp_sm_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_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset);

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

@ -68,6 +68,7 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_sm_verbose ) {
@ -186,6 +187,8 @@ int mca_sharedfp_sm_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_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset);

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

@ -71,6 +71,7 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -192,6 +193,7 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh,
/* Each process now has its own individual offset */
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,