OpenM++ runtime library (libopenm)
msgMpi.h
Go to the documentation of this file.
1
5// Copyright (c) 2013-2015 OpenM++
6// This code is licensed under the MIT license (see LICENSE.txt for details)
7
8#ifndef MSG_MPI_H
9#define MSG_MPI_H
10
11#include "msg.h"
12
13using namespace std;
14
15namespace openm
16{
19 {
20 public:
22 MpiException(int i_mpiReturn) : MsgException(makeErrorMsg(i_mpiReturn).c_str()), mpiRet(i_mpiReturn), mpiRank(0)
23 { }
24
26 MpiException(int i_mpiReturn, int i_rank) : MsgException(makeErrorMsg(i_mpiReturn, i_rank).c_str()), mpiRet(i_mpiReturn), mpiRank(i_rank)
27 { }
28
30 int mpiReturn(void) const { return mpiRet; }
31
33 int rank(void) const { return mpiRank; }
34
35 private:
36 int mpiRet; // return code from MPI call
37 int mpiRank; // MPI process rank
38
40 static const string makeErrorMsg(int i_mpiReturn);
41
43 static const string makeErrorMsg(int i_mpiReturn, int i_rank);
44 };
45}
46
47#include "msgExecBase.h"
48#include "msgMpiPacked.h"
49#include "msgMpiExec.h"
50#include "msgMpiSend.h"
51#include "msgMpiRecv.h"
52
53#endif // MSG_MPI_H
messaging library MPI exception
Definition: msgMpi.h:19
int mpiReturn(void) const
get MPI return code
Definition: msgMpi.h:30
MpiException(int i_mpiReturn, int i_rank)
create messaging library exception based on MPI return code and process rank
Definition: msgMpi.h:26
MpiException(int i_mpiReturn)
create messaging library exception based on MPI return code
Definition: msgMpi.h:22
int rank(void) const
get MPI process rank
Definition: msgMpi.h:33
openM++ exceptions
Definition: omError.h:19
OpenM++: message passing library public interface.
OpenM++: message passing library base class.
OpenM++: message passing library main class for MPI-based implementation.
OpenM++ message passing library: pack and unpack wrapper class for MPI-based implementation.
OpenM++ message passing library: receiver class for MPI-based implementation.
OpenM++ message passing library: sender class for MPI-based implementation.
openM++ namespace
Definition: log.h:32