Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MpiErrorHandler.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* MpiErrorHandler.h (C) 2000-2020 */
9/* */
10/* Error handler for MPI. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_PARALLEL_MPI_MPIERRORHANDLER_H
13#define ARCANE_PARALLEL_MPI_MPIERRORHANDLER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/parallel/mpi/ArcaneMpi.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class ARCANE_MPI_EXPORT MpiErrorHandler
32{
33 public:
34
35 MpiErrorHandler();
36 ~MpiErrorHandler();
37 void removeHandler();
38 void registerHandler(MPI_Comm comm);
39
40 private:
41
42 MPI_Errhandler m_err_handler;
43 bool m_has_err_handler;
44
45 private:
46
47 // Error handler
48 static void _ErrorHandler(MPI_Comm*, int*, ...);
49};
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
54} // End namespace Arcane
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59#endif
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --