File: status_setb.c

package info (click to toggle)
openmpi 4.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 127,592 kB
  • sloc: ansic: 690,998; makefile: 43,047; f90: 19,220; sh: 7,182; java: 6,360; perl: 3,590; cpp: 2,227; python: 1,350; lex: 989; fortran: 61; tcl: 12
file content (37 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/* 
 *
 *   Copyright (C) 1997 University of Chicago. 
 *   See COPYRIGHT notice in top-level directory.
 */

#include "adio.h"
#include "mpi.h"

#if defined(MPICH2) || (defined(MPICH) && (MPICH_NAME >= 3))
/* Not quite correct, but much closer for MPI2 */
/* TODO: still needs to handle partial datatypes and situations where the mpi
 * implementation fills status with something other than bytes (globus2 might
 * do this) */
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, 
			  MPI_Count nbytes)
{
    ADIOI_UNREFERENCED_ARG(datatype);
    /* it's ok that ROMIO stores number-of-bytes in status, not 
     * count-of-copies, as long as MPI_GET_COUNT knows what to do */
    if (status != MPI_STATUS_IGNORE)
        MPI_Status_set_elements_x(status, MPI_BYTE, nbytes);
    return MPI_SUCCESS;
}
#elif defined(MPILAM) || defined(MPISGI)
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype,
		MPI_Count nbytes)
{
  /* Bogusness to silence compiler warnings */
  if (datatype == MPI_DATATYPE_NULL);

  if (status != MPI_STATUS_IGNORE)
	  status->st_length = nbytes;
  return MPI_SUCCESS;
}
#endif