14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/utils/ITraceMng.h"
17#include "arcane/utils/ParallelFatalErrorException.h"
19#include "arcane/core/IParallelMng.h"
20#include "arcane/core/ISubDomain.h"
21#include "arcane/core/SequentialSection.h"
44SequentialSection(ISubDomain* sd)
45: m_parallel_mng(sd->parallelMng())
55~SequentialSection() ARCANE_NOEXCEPT_FALSE
57 Integer sid = m_parallel_mng->commRank();
59 Integer error_value = m_has_error ? 1 : 0;
61 ArrayView<Integer> iv(1, &error_value);
62 m_parallel_mng->broadcast(iv, 0);
74void SequentialSection::
77 Integer sid = m_parallel_mng->commRank();
83 ArrayView<Integer> iv(1, &error_value);
84 m_parallel_mng->broadcast(iv, 0);
94void SequentialSection::
97 Integer sid = m_parallel_mng->commRank();
98 ITraceMng* trace = m_parallel_mng->traceMng();
100 trace->logdate() <<
"Subdomain " << sid <<
"Fatal in sequantial section";
101 m_parallel_mng->barrier();
102 throw ParallelFatalErrorException(
"sequential section");
108void SequentialSection::
109setError(
bool is_error)
111 m_has_error = is_error;
Interface of the parallelism manager for a subdomain.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.