PFASST++
Utilities

General utility functions not directly related to PFASST++ but also handy in user code. More...

Macros

#define UNUSED(expr)   (void)(expr)
 Denoting unused function parameters for omitting compiler warnings. More...
 

Functions

static MPI_Status MPI_Status_factory ()
 creates and initializes a new empty MPI_Status object More...
 
static void pfasst::mpi::check_mpi_error (const int err_code)
 checks MPI error code More...
 

Variables

static constexpr const char * pfasst::VERSION = "v0.5.0-rc1-48-g4da93b0-dirty"
 PFASST++ version: closest release tag and a brief git hash. More...
 

Detailed Description

General utility functions not directly related to PFASST++ but also handy in user code.

Macro Definition Documentation

#define UNUSED (   expr)    (void)(expr)

Denoting unused function parameters for omitting compiler warnings.

To denote an unused function parameter just use this makro on it in the function body:

void foo(T bar) {
UNUSED(bar);
// some logic not using parameter `bar`
}

which renders to

void foo(T bar) {
(void)(bar);
// some logic not using parameter `bar`
}

which is the standard and compiler independet way of omitting warnings on unused parameters while still being able to fully document the parameter with Doxygen.

Parameters
[in]exprparameter to be denoted as unused
Since
v0.2.0

Definition at line 32 of file globals.hpp.

Referenced by pfasst::examples::boris::BorisSweeper< scalar, time >::boris_solve(), pfasst::encap::Encapsulation< time >::broadcast(), pfasst::ISweeper< time >::broadcast(), pfasst::examples::boris::BorisSweeper< scalar, time >::exact(), pfasst::encap::IMEXSweeper< time >::f_expl_eval(), pfasst::examples::scalar::ScalarSweeper< time >::f_expl_eval(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::f_expl_eval(), pfasst::encap::ImplicitSweeper< time >::f_impl_eval(), pfasst::encap::IMEXSweeper< time >::f_impl_eval(), pfasst::examples::scalar::ScalarSweeper< time >::f_impl_eval(), pfasst::examples::vdp::VdpSweeper< time >::f_impl_eval(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::f_impl_eval(), pfasst::encap::ImplicitSweeper< time >::impl_solve(), pfasst::encap::IMEXSweeper< time >::impl_solve(), pfasst::examples::scalar::ScalarSweeper< time >::impl_solve(), pfasst::examples::vdp::VdpSweeper< time >::impl_solve(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::impl_solve(), pfasst::encap::EncapSweeper< time >::integrate(), pfasst::encap::PolyInterpMixin< time >::interpolate(), pfasst::ITransfer< time >::interpolate_initial(), pfasst::mpi::MPIStatus::post(), pfasst::encap::Encapsulation< time >::post(), pfasst::ISweeper< time >::post(), pfasst::encap::ImplicitSweeper< time >::predict(), pfasst::encap::IMEXSweeper< time >::predict_without_left(), pfasst::encap::Encapsulation< time >::recv(), pfasst::ISweeper< time >::recv(), pfasst::encap::EncapSweeper< time >::reevaluate(), pfasst::encap::EncapSweeper< time >::residual(), pfasst::encap::PolyInterpMixin< time >::restrict(), pfasst::ITransfer< time >::restrict_initial(), pfasst::ISweeper< time >::save(), pfasst::encap::Encapsulation< time >::saxpy(), pfasst::encap::Encapsulation< time >::send(), pfasst::ISweeper< time >::send(), pfasst::ISweeper< time >::setup(), and pfasst::examples::boris::BorisSweeper< scalar, time >::setup().

Function Documentation

static void pfasst::mpi::check_mpi_error ( const int  err_code)
inlinestatic

checks MPI error code

In case err_code is not MPI_SUCCESS this throws MPIError with the error code looked up to a descriptive string as defined by the MPI implementation.

Parameters
[in]err_codeMPI error code as returned from an MPI call
Since
v0.5.0

Definition at line 64 of file mpi_communicator.hpp.

Referenced by pfasst::mpi::MPIError::from_code(), MAKE_LOGGABLE(), pfasst::mpi::MPIStatus::recv(), pfasst::mpi::MPIStatus::send(), pfasst::mpi::MPICommunicator::set_comm(), and pfasst::encap::VectorEncapsulation< scalar, time >::~VectorEncapsulation().

+ Here is the caller graph for this function:

static MPI_Status MPI_Status_factory ( )
inlinestatic

creates and initializes a new empty MPI_Status object

An empty MPI_Status is defined as an MPI_Status object with MPI_ERROR as MPI_SUCCESS, MPI_SOURCE as MPI_ANY_SOURCE and MPI_TAG as MPI_ANY_TAG (cf. MPI Standard v3; section 3.7.3).

rationale: some MPI implementations don't initialize the members of MPI_Status correctly

Returns
empty MPI_Status object
Since
v0.5.0

Definition at line 29 of file mpi_communicator.hpp.

Referenced by pfasst::mpi::MPIStatus::recv(), and pfasst::encap::VectorEncapsulation< scalar, time >::~VectorEncapsulation().

+ Here is the caller graph for this function:

Variable Documentation

pfasst::VERSION = "v0.5.0-rc1-48-g4da93b0-dirty"
static

PFASST++ version: closest release tag and a brief git hash.

Definition at line 24 of file config.hpp.

Referenced by pfasst::log::start_log().