1
1
openmpi/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c
Edgar Gabriel 9986a15b57 sharedfp/individual: only complain about fseek if sharedfp operations are really in use
this component can only be used in very specific scenarios. However, since some file systems do not support file locking and processes might be distributed over multiple nodes (hence the sm sharedfp component is also inelligible), the component might be selected in some scenarios, even if an application does not intend to use shared file pointers.

Since the fseek_shared function is involved as part of the File_set_view operation, only complain about the inability to perform the seek_shared operation if actual shared file pointer operations are being used. This avoid spurious error values being returned.

Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
2018-06-18 18:25:29 -05:00

48 строки
1.7 KiB
C

/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2013 University of Houston. All rights reserved.
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "sharedfp_individual.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/sharedfp/sharedfp.h"
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 == 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.
*/
return OMPI_SUCCESS;
}
opal_output(0,"mca_sharedfp_individual_seek: NOT IMPLEMENTED\n");
return OMPI_ERROR;
}