Section of code to be executed sequentially. More...
#include <arcane/core/SequentialSection.h>
Public Member Functions | |
| SequentialSection (IParallelMng *) | |
| SequentialSection (ISubDomain *) | |
| void | setError (bool is_error) |
Section of code to be executed sequentially.
An instance of this class allows a part of the code to run as if the code were sequential. The code within the lifetime of this object is first executed on proc 0, and then, if everything is okay on the others. This allows checking it once when the code executed is the same everywhere (for example, reading the dataset) and displaying messages only once in case of an error.
Since potential errors are only displayed by a single subdomain, this class should only be used when you are certain that all subdomains perform the same processing, otherwise errors will not be recognized.
Furthermore, since all subdomains block until the first subdomain has finished executing the code, you must not call the parallelism manager in this section.
In case of an error, an exception of type ExParallelFatalError is sent in the destructor.
Definition at line 58 of file SequentialSection.h.
|
explicit |
Definition at line 32 of file SequentialSection.cc.
|
explicit |
Definition at line 43 of file SequentialSection.cc.
| Arcane::SequentialSection::~SequentialSection | ( | ) |
Definition at line 54 of file SequentialSection.cc.
| void Arcane::SequentialSection::setError | ( | bool | is_error | ) |
Definition at line 108 of file SequentialSection.cc.