source:
XIOS3/trunk/src/mpi_tools.hpp
@
2633
Last change on this file since 2633 was 2614, checked in by ymipsl, 4 months ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[1759] | 1 | #ifndef __XIOS_MPI_TOOLS_HPP__ |
[1984] | 2 | #define __XIOS_MPI_TOOLS_HPP__ |
[1759] | 3 | |
4 | #include <string> | |
[2576] | 5 | #include <map> |
[1759] | 6 | |
7 | namespace xios | |
8 | { | |
9 | ||
10 | int MPI_Bcast_string(std::string& str, int root, MPI_Comm comm) ; | |
[1984] | 11 | |
12 | template<typename T> | |
13 | MPI_Datatype MPI_GetType(void) ; | |
14 | ||
[2614] | 15 | template<> |
16 | MPI_Datatype MPI_GetType<bool>(void) ; | |
17 | ||
[1984] | 18 | template<> |
[2118] | 19 | MPI_Datatype MPI_GetType<char>(void); |
[1984] | 20 | |
21 | template<> | |
[2118] | 22 | MPI_Datatype MPI_GetType<short int>(void); |
[1984] | 23 | |
24 | template<> | |
[2118] | 25 | MPI_Datatype MPI_GetType<int>(void); |
[1984] | 26 | |
27 | template<> | |
[2118] | 28 | MPI_Datatype MPI_GetType<size_t>(void); |
[1984] | 29 | |
30 | template<> | |
[2118] | 31 | MPI_Datatype MPI_GetType<float>(void); |
[1984] | 32 | |
33 | template<> | |
[2118] | 34 | MPI_Datatype MPI_GetType<double>(void); |
[1984] | 35 | |
36 | template<> | |
[2118] | 37 | MPI_Datatype MPI_GetType<long double>(void); |
[1984] | 38 | |
[2576] | 39 | class CCommTrack |
40 | { | |
41 | private: | |
42 | static std::map<MPI_Comm,std::string> commTrack_ ; | |
43 | ||
44 | public: | |
45 | static void registerComm(const MPI_Comm& comm) ; | |
[1984] | 46 | |
[2576] | 47 | static void releaseComm(const MPI_Comm& comm) ; |
48 | ||
49 | static void dumpComm(void) ; | |
50 | ||
51 | static const std::map<MPI_Comm,std::string>& getCommTrack(void) {return commTrack_ ;} | |
52 | } ; | |
[1759] | 53 | } |
[2118] | 54 | #endif |
Note: See TracBrowser
for help on using the repository browser.