Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
mpiErrorCheck.hpp File Reference

Utility functions for MPI error checking. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shamcomm
 namespace for communication related stuff
 

Macros

#define MPICHECK(mpicall)   shamcomm::check_mpi_return(mpicall, #mpicall)
 Shortcut macro to check MPI return codes.
 

Functions

void shamcomm::check_mpi_return (int ret, const char *log)
 Check a MPI return code.
 

Detailed Description

Utility functions for MPI error checking.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

This file contains a simple function to check the return code of MPI calls and abort the program if an error occured. The function prints an error message indicating where the error occured (using the provided log string).

The function check_mpi_return is the only function provided in this file.

Definition in file mpiErrorCheck.hpp.

Macro Definition Documentation

◆ MPICHECK

#define MPICHECK (   mpicall)    shamcomm::check_mpi_return(mpicall, #mpicall)

Shortcut macro to check MPI return codes.

This macro is a shortcut to avoid having to write shamcomm::check_mpi_return(mpicall, #mpicall) everywhere in the code.

It expands to a call to shamcomm::check_mpi_return with the MPI return code and the name of the MPI function as arguments. This last argument is used to the MPI call that produced the error

Definition at line 52 of file mpiErrorCheck.hpp.