source: CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/oasis3-mct/lib/mct/mpi-serial/getcount.c

Last change on this file was 5725, checked in by aclsce, 3 years ago

Added new oasis3-MCT version to be used to handle ensembles simulations with XIOS.

File size: 781 bytes
Line 
1/* getcount.c
2 *
3 * 07/2007 JCY
4 * Functions for count information regarding MPI_Status
5 */
6
7#include "type.h"
8#include "mpiP.h"
9
10
11FC_FUNC( mpi_get_count , MPI_GET_COUNT )
12         (int *status, int *datatype, int *count, int *ierr)
13{
14  *ierr = MPI_Get_count((MPI_Status *)status, *datatype, count);
15}
16
17
18int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count)
19{
20  *count = status->get_count;
21}
22
23
24/********/
25
26
27FC_FUNC( mpi_get_elements , MPI_GET_ELEMENTS )
28         (MPI_Status *status, int *datatype, int *count, int *ierr)
29{
30  *ierr = MPI_Get_elements(status, *datatype, count);
31}
32
33
34int MPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count)
35{
36  Datatype dt_ptr = *(Datatype*)mpi_handle_to_datatype(datatype);
37  *count = status->get_count * dt_ptr->count;
38}
39
40
Note: See TracBrowser for help on using the repository browser.