1
1

Merge pull request #5291 from edgargabriel/topic/sharedfp-revamp

sharedfp/individual: only complain about fseek if sharedfp operations…
Этот коммит содержится в:
Edgar Gabriel 2018-06-18 19:16:47 -05:00 коммит произвёл GitHub
родитель d6a81ecf41 9986a15b57
Коммит f301cabff3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 12 добавлений и 7 удалений

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

@ -42,6 +42,7 @@ int mca_sharedfp_individual_module_finalize (ompio_file_t *file);
extern int mca_sharedfp_individual_priority;
extern int mca_sharedfp_individual_verbose;
extern int mca_sharedfp_individual_usage_counter;
OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_individual_component;
/*

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

@ -45,6 +45,7 @@ int mca_sharedfp_individual_iwrite(ompio_file_t *fh,
"mca_sharedfp_individual_iwrite: module not initialized \n");
return OMPI_ERROR;
}
mca_sharedfp_individual_usage_counter++;
/* Calculate the number of bytes of data that needs to be written*/
opal_datatype_type_size ( &datatype->super, &numofbytes);
@ -103,6 +104,7 @@ int mca_sharedfp_individual_write_ordered_begin(ompio_file_t *fh,
"at any given point in time!\n");
return MPI_ERR_REQUEST;
}
mca_sharedfp_individual_usage_counter++;
/*Retrieve the sharedfp data structures*/
sh = fh->f_sharedfp_data;

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

@ -27,19 +27,18 @@
#include "ompi/constants.h"
#include "ompi/mca/sharedfp/sharedfp.h"
static int seek_counter=0;
int mca_sharedfp_individual_usage_counter=0;
int mca_sharedfp_individual_seek (ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset, int whence)
{
if ( 0 == seek_counter &&
0 == offset &&
MPI_SEEK_SET == whence ) {
/* This is occuring when setting the default file view. THat is ok.
** The component doesn't support however further seek operations.
if ( 0 == mca_sharedfp_individual_usage_counter ) {
/* As long as nobody using this module 'inapproprialy', its is ok.
** to call this function, since it might come out of File_set_view.
** however, we have to return an error as soon as people are calling
** this function on this component and expect it to work.
*/
seek_counter++;
return OMPI_SUCCESS;
}

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

@ -45,6 +45,7 @@ int mca_sharedfp_individual_write (ompio_file_t *fh,
"sharedfp_individual_write: module not initialized \n");
return OMPI_ERROR;
}
mca_sharedfp_individual_usage_counter++;
/* Calculate the number of bytes of data that need to be written*/
opal_datatype_type_size ( &datatype->super, &numofbytes);
@ -98,6 +99,8 @@ int mca_sharedfp_individual_write_ordered (ompio_file_t *fh,
return OMPI_ERROR;
}
mca_sharedfp_individual_usage_counter++;
/*Retrieve the sharedfp data structures*/
sh = fh->f_sharedfp_data;