ICON Community Interface 0.4.0
Loading...
Searching...
No Matches
mpi_handshake.c File Reference
#include <limits.h>
#include <mpi.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for mpi_handshake.c:

Go to the source code of this file.

Macros

#define mh_mpi_call(call, comm)
 
#define mh_assert(exp, msg, comm)
 

Functions

static void mh_mpi_error (int error_code, MPI_Comm comm)
 
static void mh_abort (const char *error_string, MPI_Comm comm, const char *file, int line)
 
void mpi_handshake (char const **group_names, MPI_Comm *group_comms, size_t n, MPI_Comm comm)
 
void mpi_handshake_c2f (int n, char const **group_names, MPI_Fint *group_comms, MPI_Fint comm)
 
void mpi_handshake_dummy (MPI_Comm comm)
 

Macro Definition Documentation

◆ mh_assert

#define mh_assert ( exp,
msg,
comm )
Value:
{ \
if (!((exp))) \
mh_abort(((msg)), ((comm)), __FILE__, __LINE__); \
}

Definition at line 73 of file mpi_handshake.c.

◆ mh_mpi_call

#define mh_mpi_call ( call,
comm )
Value:
do { \
int error_code = (call); \
if (error_code != MPI_SUCCESS) \
mh_mpi_error(error_code, comm); \
} while (0)

Definition at line 66 of file mpi_handshake.c.

Function Documentation

◆ mh_abort()

static void mh_abort ( const char * error_string,
MPI_Comm comm,
const char * file,
int line )
static

Definition at line 55 of file mpi_handshake.c.

◆ mh_mpi_error()

static void mh_mpi_error ( int error_code,
MPI_Comm comm )
static

Definition at line 42 of file mpi_handshake.c.

◆ mpi_handshake()

void mpi_handshake ( char const ** group_names,
MPI_Comm * group_comms,
size_t n,
MPI_Comm comm )

Common MPI communicator splitting

Parameters
[in]group_namesnames of process groups
[out]group_commsMPI communicators containing all processes that provided the same group names
[in]nnumber of group names
[in]commMPI communicator used for the splitting
Remarks
this call is collective for all processes in comm (if no splitting is required by the local processes mo_mpi_handshake::mpi_handshake_dummy can be called instead)

Definition at line 79 of file mpi_handshake.c.

Here is the caller graph for this function:

◆ mpi_handshake_c2f()

void mpi_handshake_c2f ( int n,
char const ** group_names,
MPI_Fint * group_comms,
MPI_Fint comm )

Definition at line 169 of file mpi_handshake.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mpi_handshake_dummy()

void mpi_handshake_dummy ( MPI_Comm comm)
Authors
08/2021 :: ICON Community Interface comin.nosp@m.@ico.nosp@m.n-mod.nosp@m.el.o.nosp@m.rg

SPDX-License-Identifier: BSD-3-Clause

Please see the file LICENSE in the root of the source tree for this code. Where software is supplied by third parties, it is indicated in the headers of the routines. dummy call of Common MPI communicator splitting

Definition at line 179 of file mpi_handshake.c.

Here is the call graph for this function: