root/ompi/mca/io/romio321/romio/mpi-io/get_posn.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPI_File_get_position

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /* 
   3  *
   4  *   Copyright (C) 1997 University of Chicago. 
   5  *   See COPYRIGHT notice in top-level directory.
   6  */
   7 
   8 #include "mpioimpl.h"
   9 #include "adioi.h"
  10 
  11 #ifdef HAVE_WEAK_SYMBOLS
  12 
  13 #if defined(HAVE_PRAGMA_WEAK)
  14 #pragma weak MPI_File_get_position = PMPI_File_get_position
  15 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
  16 #pragma _HP_SECONDARY_DEF PMPI_File_get_position MPI_File_get_position
  17 #elif defined(HAVE_PRAGMA_CRI_DUP)
  18 #pragma _CRI duplicate MPI_File_get_position as PMPI_File_get_position
  19 /* end of weak pragmas */
  20 #elif defined(HAVE_WEAK_ATTRIBUTE)
  21 int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) __attribute__((weak,alias("PMPI_File_get_position")));
  22 #endif
  23 
  24 /* Include mapping from MPI->PMPI */
  25 #define MPIO_BUILD_PROFILING
  26 #include "mpioprof.h"
  27 #endif
  28 
  29 /*@
  30     MPI_File_get_position - Returns the current position of the 
  31                 individual file pointer in etype units relative to
  32                 the current view
  33 
  34 Input Parameters:
  35 . fh - file handle (handle)
  36 
  37 Output Parameters:
  38 . offset - offset of individual file pointer (nonnegative integer)
  39 
  40 .N fortran
  41 @*/
  42 int MPI_File_get_position(MPI_File fh, MPI_Offset *offset)
  43 {
  44     int error_code;
  45     ADIO_File adio_fh;
  46     static char myname[] = "MPI_FILE_GET_POSITION";
  47 
  48     adio_fh = MPIO_File_resolve(fh);
  49 
  50     /* --BEGIN ERROR HANDLING-- */
  51     MPIO_CHECK_FILE_HANDLE(adio_fh, myname, error_code);
  52     MPIO_CHECK_NOT_SEQUENTIAL_MODE(adio_fh, myname, error_code);
  53     /* --END ERROR HANDLING-- */
  54 
  55     ADIOI_Get_position(adio_fh, offset);
  56 
  57 fn_exit:
  58     return MPI_SUCCESS;
  59 }

/* [<][>][^][v][top][bottom][index][help] */