Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
CheckpointInfo.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/* CheckpointInfo.h (C) 2000-2018 */
9/* */
10/* Checkpoint information. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CHECKPOINTINFO_H
13#define ARCANE_CHECKPOINTINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
26class IParallelMng;
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
34class ARCANE_CORE_EXPORT CheckpointInfo
35{
36 public:
37
38 CheckpointInfo();
39
40 public:
41
42 Int32 nbSubDomain() const { return m_nb_sub_domain; }
43 void setNbSubDomain(Int32 v) { m_nb_sub_domain = v; }
44
45 Int32 nbReplication() const { return m_nb_replication; }
46 void setNbReplication(Int32 v) { m_nb_replication = v; }
47
48 void setServiceName(const String& v) { m_service_name = v; }
49 const String& serviceName() const { return m_service_name; }
50
51 void setDirectory(const String& v) { m_directory = v; }
52 const String& directory() const { return m_directory; }
53
54 Int32 checkpointIndex() const { return m_checkpoint_index; }
55 void setCheckpointIndex(Int32 v) { m_checkpoint_index = v; }
56
57 Real checkpointTime() const { return m_checkpoint_time; }
58 void setCheckpointTime(Real v) { m_checkpoint_time = v; }
59
60 void setReaderMetaData(const String& v) { m_reader_meta_data = v; }
61 const String& readerMetaData() const { return m_reader_meta_data; }
62
63 Int32 subDomainRank() const { return m_sub_domain_rank; }
64 void setSubDomainRank(Int32 v) { m_sub_domain_rank = v; }
65
66 Int32 replicationRank() const { return m_replication_rank; }
67 void setReplicationRank(Int32 v) { m_replication_rank = v; }
68
70 bool isRestart() const { return m_is_restart; }
71 void setIsRestart(bool v) { m_is_restart = v; }
72
73 private:
74
75 Int32 m_nb_replication;
76 Int32 m_nb_sub_domain;
77 String m_service_name;
78 String m_directory;
79 Real m_checkpoint_time;
80 Int32 m_checkpoint_index;
81 String m_reader_meta_data;
82 Int32 m_sub_domain_rank;
83 Int32 m_replication_rank;
84 bool m_is_restart;
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
93class CheckpointReadInfo
94{
95 public:
96
97 explicit CheckpointReadInfo(const CheckpointInfo& ci)
98 : m_checkpoint_info(ci)
99 , m_reader(nullptr)
100 , m_parallel_mng(nullptr)
101 {}
102
103 public:
104
105 const CheckpointInfo& checkpointInfo() const { return m_checkpoint_info; }
106 ICheckpointReader2* reader() const { return m_reader; }
107 void setReader(ICheckpointReader2* v) { m_reader = v; }
108 IParallelMng* parallelMng() const { return m_parallel_mng; }
109 void setParallelMng(IParallelMng* v) { m_parallel_mng = v; }
110
111 private:
112
113 CheckpointInfo m_checkpoint_info;
114 ICheckpointReader2* m_reader;
115 IParallelMng* m_parallel_mng;
116};
117
118/*---------------------------------------------------------------------------*/
119/*---------------------------------------------------------------------------*/
120
121} // End namespace Arcane
122
123/*---------------------------------------------------------------------------*/
124/*---------------------------------------------------------------------------*/
125
126#endif
Information about a checkpoint.
bool isRestart() const
Indicates if it is a restart.
Interface for the protection/recovery reading service (V2).
Interface of the parallelism manager for a subdomain.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.