source: XIOS/dev/dev_ym/XIOS_COUPLING/src/mpi.hpp @ 1853

Last change on this file since 1853 was 1759, checked in by ymipsl, 5 years ago

Add some tools for MPI communication

  • find MPI_SIZE_T type equivalent to size_t integer
  • Add MPI_Bcast for string

YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 748 bytes
Line 
1#ifndef __XIOS_MPI_HPP__
2#define __XIOS_MPI_HPP__
3
4/* skip C++ Binding for mpich , intel MPI */
5#define MPICH_SKIP_MPICXX
6
7/* skip C++ Binding for SGI MPI library */
8#define MPI_NO_CPPBIND
9
10/* skip C++ Binding for OpenMPI */
11#define OMPI_SKIP_MPICXX
12
13#include <mpi.h>
14#include <climits>
15#include <cstdint>
16
17#if SIZE_MAX == UCHAR_MAX
18   #define MPI_SIZE_T MPI_UNSIGNED_CHAR
19#elif SIZE_MAX == USHRT_MAX
20   #define MPI_SIZE_T MPI_UNSIGNED_SHORT
21#elif SIZE_MAX == UINT_MAX
22   #define MPI_SIZE_T MPI_UNSIGNED
23#elif SIZE_MAX == ULONG_MAX
24   #define MPI_SIZE_T MPI_UNSIGNED_LONG
25#elif SIZE_MAX == ULLONG_MAX
26   #define MPI_SIZE_T MPI_UNSIGNED_LONG_LONG
27#else
28   #error "Unable to find MPI_SIZE_T equivalent type"
29#endif
30
31#include "mpi_tools.hpp"
32
33#endif
Note: See TracBrowser for help on using the repository browser.