root/ompi/mca/io/romio321/romio/adio/common/status_setb.c

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

DEFINITIONS

This source file includes following definitions.
  1. MPIR_Status_set_bytes
  2. MPIR_Status_set_bytes

   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 "adio.h"
   9 #include "mpi.h"
  10 
  11 #if defined(MPICH2) || (defined(MPICH) && (MPICH_NAME >= 3))
  12 /* Not quite correct, but much closer for MPI2 */
  13 /* TODO: still needs to handle partial datatypes and situations where the mpi
  14  * implementation fills status with something other than bytes (globus2 might
  15  * do this) */
  16 int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, 
  17                           MPI_Count nbytes)
  18 {
  19     ADIOI_UNREFERENCED_ARG(datatype);
  20     /* it's ok that ROMIO stores number-of-bytes in status, not 
  21      * count-of-copies, as long as MPI_GET_COUNT knows what to do */
  22     if (status != MPI_STATUS_IGNORE)
  23         MPI_Status_set_elements_x(status, MPI_BYTE, nbytes);
  24     return MPI_SUCCESS;
  25 }
  26 #elif defined(MPILAM) || defined(MPISGI)
  27 int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype,
  28                 MPI_Count nbytes)
  29 {
  30   /* Bogusness to silence compiler warnings */
  31   if (datatype == MPI_DATATYPE_NULL);
  32 
  33   if (status != MPI_STATUS_IGNORE)
  34           status->st_length = nbytes;
  35   return MPI_SUCCESS;
  36 }
  37 #endif

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