MeDiPack  1.3.0
A Message Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
message.hpp
Go to the documentation of this file.
1/*
2 * MeDiPack, a Message Differentiation Package
3 *
4 * Copyright (C) 2015-2024 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau
5 * Homepage: http://scicomp.rptu.de
6 * Contact: Prof. Nicolas R. Gauger (codi@scicomp.uni-kl.de)
7 *
8 * Lead developers: Max Sagebaum (SciComp, University of Kaiserslautern-Landau)
9 *
10 * This file is part of MeDiPack (http://scicomp.rptu.de/software/codi).
11 *
12 * MeDiPack is free software: you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation, either
15 * version 3 of the License, or (at your option) any later version.
16 *
17 * MeDiPack is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * See the GNU Lesser General Public License for more details.
22 * You should have received a copy of the GNU
23 * Lesser General Public License along with MeDiPack.
24 * If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Authors: Max Sagebaum, Tim Albring (SciComp, University of Kaiserslautern-Landau)
27 */
28
29#pragma once
30
31#include "ampiMisc.h"
32
34
38namespace medi {
39
40#if MEDI_MPI_VERSION_3_0 <= MEDI_MPI_TARGET
44 struct AMPI_Message {
45 MPI_Message message;
46
47 int tag;
48 int src;
50 };
51
52 inline int AMPI_Mprobe(int source, int tag, AMPI_Comm comm, AMPI_Message* message, AMPI_Status* status) {
53 message->src = source;
54 message->tag = tag;
55 message->comm = comm;
56
57 return MPI_Mprobe(source, tag, comm, &message->message, status);
58 }
59
60 inline int AMPI_Improbe(int source, int tag, AMPI_Comm comm, int* flag, AMPI_Message* message, AMPI_Status* status) {
61 message->src = source;
62 message->tag = tag;
63 message->comm = comm;
64
65 return MPI_Improbe(source, tag, comm, flag, &message->message, status);
66 }
67#endif
68}
#define AMPI_Status
Definition ampiDefinitions.h:772
#define AMPI_Comm
Definition ampiDefinitions.h:778
Global namespace for MeDiPack - Message Differentiation Package.
Definition adjointInterface.hpp:37
int AMPI_Mprobe(int source, int tag, MPI_Comm comm, AMPI_Message *message, MPI_Status *status)
Definition message.hpp:52
int AMPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, AMPI_Message *message, MPI_Status *status)
Definition message.hpp:60
Stores additional information for a MPI_Message.
Definition message.hpp:44
int src
Definition message.hpp:48
MPI_Comm comm
Definition message.hpp:49
MPI_Message message
Definition message.hpp:45
int tag
Definition message.hpp:47