1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
4 * Copyright (C) 1997 University of Chicago.
5 * See COPYRIGHT notice in top-level directory.
10 #ifdef HAVE_WEAK_SYMBOLS
12 #if defined(HAVE_PRAGMA_WEAK)
13 #pragma weak MPI_File_get_position_shared = PMPI_File_get_position_shared
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPI_File_get_position_shared MPI_File_get_position_shared
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPI_File_get_position_shared as PMPI_File_get_position_shared
18 /* end of weak pragmas */
21 /* Include mapping from MPI->PMPI */
22 #define MPIO_BUILD_PROFILING
27 MPI_File_get_position_shared - Returns the current position of the
28 shared file pointer in etype units relative to the current view
31 . fh - file handle (handle)
34 . offset - offset of shared file pointer (nonnegative integer)
38 int MPI_File_get_position_shared(MPI_File mpi_fh
, MPI_Offset
*offset
)
42 static char myname
[] = "MPI_FILE_GET_POSITION_SHARED";
44 fh
= MPIO_File_resolve(mpi_fh
);
46 /* --BEGIN ERROR HANDLING-- */
47 MPIO_CHECK_FILE_HANDLE(fh
, myname
, error_code
);
48 MPIO_CHECK_NOT_SEQUENTIAL_MODE(fh
, myname
, error_code
);
49 MPIO_CHECK_FS_SUPPORTS_SHARED(fh
, myname
, error_code
);
50 /* --END ERROR HANDLING-- */
52 ADIOI_TEST_DEFERRED(fh
, myname
, &error_code
);
54 ADIO_Get_shared_fp(fh
, 0, offset
, &error_code
);
55 /* --BEGIN ERROR HANDLING-- */
56 if (error_code
!= MPI_SUCCESS
)
57 error_code
= MPIO_Err_return_file(fh
, error_code
);
58 /* --END ERROR HANDLING-- */