14#include "arcane/utils/PlatformUtils.h"
15#include "arcane/utils/ScopedPtr.h"
17#include "arcane/core/EntryPoint.h"
18#include "arcane/core/ISubDomain.h"
19#include "arcane/core/ModuleFactory.h"
20#include "arcane/core/IVerifierService.h"
21#include "arcane/core/ServiceUtils.h"
22#include "arcane/core/IVariableMng.h"
23#include "arcane/core/IParallelMng.h"
24#include "arcane/core/IMesh.h"
25#include "arcane/core/IItemFamily.h"
26#include "arcane/core/ITimeLoopMng.h"
27#include "arcane/core/ServiceBuilder.h"
28#include "arcane/core/ObserverPool.h"
29#include "arcane/core/ICheckpointMng.h"
30#include "arcane/core/MeshVisitor.h"
31#include "arcane/core/IDirectory.h"
33#include "arcane/std/ArcaneCeaVerifier_axl.h"
46class ArcaneVerifierModule
47:
public ArcaneArcaneCeaVerifierObject
60 void onInit()
override;
68 void _checkSortedGroups();
75ArcaneVerifierModule(
const ModuleBuildInfo& mb)
76: ArcaneArcaneCeaVerifierObject(mb)
83void ArcaneVerifierModule::
86 if (
options()->trace.size() != 0)
87 this->
pwarning() <<
"The option 'trace' is no longer used and should be removed";
90 info() <<
"Add observer to check sorted groups before checkpoint";
92 m_observers.addObserver(
this,
93 &ArcaneVerifierModule::_checkSortedGroups,
94 subDomain()->checkpointMng()->writeObservable());
101void ArcaneVerifierModule::
107 auto check_sorted_func = [&](ItemGroup& g) {
109 if (g.checkIsSorted())
112 info() <<
"VerifierModule: group not sorted name=" << g.name();
114 meshvisitor::visitGroups(this->mesh(), check_sorted_func);
115 info() <<
"VerifierModule: nb_unsorted_group=" << (nb_group - nb_sorted_group)
138 String verifier_service_name =
options()->verifierServiceName();
141 if (!env_service_name.
null())
142 verifier_service_name = env_service_name;
143 info() <<
"Verification Module using service=" << verifier_service_name;
147 bool compare_from_sequential =
options()->compareParallelSequential();
149 compare_from_sequential =
false;
154 if (
options()->filesInOutputDir()) {
155 if (result_file_name.
empty()) {
162 if (reference_file_name.
empty()) {
170 if (result_file_name.
empty()) {
171 result_file_name =
"compare.xml";
174 if (reference_file_name.
empty()) {
175 reference_file_name =
"check";
179 verifier_service->setResultFileName(result_file_name);
181 info() <<
"Verification check is_parallel?=" << is_parallel <<
" compare_from_sequential?=" << compare_from_sequential;
182 verifier_service->setFileName(reference_file_name);
185 info() <<
"Writing check file '" << reference_file_name <<
"'";
186 verifier_service->writeReferenceFile();
189 info() <<
"Comparing reference file '" << reference_file_name <<
"'";
190 verifier_service->doVerifFromReferenceFile(compare_from_sequential,
false);
ISubDomain * subDomain() const override
Sub-domain associated with the module.
CaseOptionsArcaneCeaVerifier * options() const
Options du jeu de données du module.
void onExit() override
points d'entrée
VersionInfo versionInfo() const override
Module version.
virtual String file(const String &file_name) const =0
Returns the full path of the file file_name in the directory.
Interface of the parallelism manager for a subdomain.
virtual bool isParallel() const =0
Returns true if the execution is parallel.
virtual IParallelMng * parallelMng()=0
Returns the parallelism manager.
virtual const IDirectory & exportDirectory() const =0
Base directory for exports.
Information for building a module.
Reference to an instance.
Utility class for instantiating a service of a given interface.
Ref< InterfaceType > createReference(const String &name, eServiceBuilderProperties properties=SB_None)
Creates an instance implementing the InterfaceType interface.
Unicode character string.
bool null() const
Returns true if the string is null.
bool empty() const
True if the string is empty (null or "").
TraceMessage info() const
Flow for an information message.
TraceMessage pwarning() const
Information about a version.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.