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

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

DEFINITIONS

This source file includes following definitions.
  1. MPI_File_iwrite_at

   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 
  10 #ifdef HAVE_WEAK_SYMBOLS
  11 
  12 #if defined(HAVE_PRAGMA_WEAK)
  13 #pragma weak MPI_File_iwrite_at = PMPI_File_iwrite_at
  14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
  15 #pragma _HP_SECONDARY_DEF PMPI_File_iwrite_at MPI_File_iwrite_at
  16 #elif defined(HAVE_PRAGMA_CRI_DUP)
  17 #pragma _CRI duplicate MPI_File_iwrite_at as PMPI_File_iwrite_at
  18 /* end of weak pragmas */
  19 #elif defined(HAVE_WEAK_ATTRIBUTE)
  20 int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count,
  21                        MPI_Datatype datatype, MPIO_Request *request)
  22     __attribute__((weak,alias("PMPI_File_iwrite_at")));
  23 #endif
  24 
  25 /* Include mapping from MPI->PMPI */
  26 #define MPIO_BUILD_PROFILING
  27 #include "mpioprof.h"
  28 #endif
  29 
  30 /*@
  31     MPI_File_iwrite_at - Nonblocking write using explicit offset
  32 
  33 Input Parameters:
  34 . fh - file handle (handle)
  35 . offset - file offset (nonnegative integer)
  36 . buf - initial address of buffer (choice)
  37 . count - number of elements in buffer (nonnegative integer)
  38 . datatype - datatype of each buffer element (handle)
  39 
  40 Output Parameters:
  41 . request - request object (handle)
  42 
  43 .N fortran
  44 @*/
  45 #ifdef HAVE_MPI_GREQUEST
  46 #include "mpiu_greq.h"
  47 #endif
  48 
  49 int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf,
  50                        int count, MPI_Datatype datatype, 
  51                        MPIO_Request *request)
  52 {
  53     int error_code;
  54     ADIO_File adio_fh;
  55     static char myname[] = "MPI_FILE_IWRITE_AT";
  56 
  57 #ifdef MPI_hpux
  58     int fl_xmpi;
  59 
  60     HPMP_IO_START(fl_xmpi, BLKMPIFILEIWRITEAT, TRDTSYSTEM,
  61                   fh, datatype, count);
  62 #endif /* MPI_hpux */
  63 
  64 
  65     adio_fh = MPIO_File_resolve(fh);
  66 
  67     error_code = MPIOI_File_iwrite(adio_fh, offset, ADIO_EXPLICIT_OFFSET, buf,
  68                                    count, datatype, myname, request);
  69 
  70     /* --BEGIN ERROR HANDLING-- */
  71     if (error_code != MPI_SUCCESS)
  72         error_code = MPIO_Err_return_file(adio_fh, error_code);
  73     /* --END ERROR HANDLING-- */
  74 
  75 #ifdef MPI_hpux
  76     HPMP_IO_END(fl_xmpi, fh, datatype, count)
  77 #endif /* MPI_hpux */
  78 
  79     return error_code;
  80 }

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