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/cea/ArcaneCeaVerifier_axl.h"
60 void onInit()
override;
68 void _checkSortedGroups();
75ArcaneVerifierModule(
const ModuleBuildInfo& mb)
76: ArcaneArcaneCeaVerifierObject(mb)
83void ArcaneVerifierModule::
87 this->
pwarning() <<
"The option 'trace' is no longer used and should be removed";
89 if (!platform::getEnvironmentVariable(
"ARCANE_VERIFY_SORTEDGROUP").null()){
90 info() <<
"Add observer to check sorted groups before checkpoint";
93 &ArcaneVerifierModule::_checkSortedGroups,
94 subDomain()->checkpointMng()->writeObservable());
101void ArcaneVerifierModule::
107 auto check_sorted_func = [&](ItemGroup& g)
110 if (g.checkIsSorted())
113 info() <<
"VerifierModule: group not sorted name=" << g.name();
115 meshvisitor::visitGroups(this->mesh(),check_sorted_func);
116 info() <<
"VerifierModule: nb_unsorted_group=" << (nb_group-nb_sorted_group)
128 if (!platform::getEnvironmentVariable(
"ARCANE_NO_VERIFY").null())
139 String verifier_service_name =
options()->verifierServiceName();
141 String env_service_name = platform::getEnvironmentVariable(
"ARCANE_VERIFIER_SERVICE");
142 if (!env_service_name.
null())
143 verifier_service_name = env_service_name;
144 info() <<
"Verification Module using service=" << verifier_service_name;
148 bool compare_from_sequential =
options()->compareParallelSequential();
150 compare_from_sequential =
false;
155 if (
options()->filesInOutputDir()) {
156 if (result_file_name.
empty()) {
163 if (reference_file_name.
empty()) {
171 if (result_file_name.
empty()) {
172 result_file_name =
"compare.xml";
175 if (reference_file_name.
empty()) {
176 reference_file_name =
"check";
180 verifier_service->setResultFileName(result_file_name);
182 info() <<
"Verification check is_parallel?=" << is_parallel <<
" compare_from_sequential?=" << compare_from_sequential;
183 verifier_service->setFileName(reference_file_name);
186 info() <<
"Writing check file '" << reference_file_name <<
"'";
187 verifier_service->writeReferenceFile();
190 info() <<
"Comparing reference file '" << reference_file_name <<
"'";
191 verifier_service->doVerifFromReferenceFile(compare_from_sequential,
false);
ISubDomain * subDomain() const override
Sous-domaine associé au module.
Generation de la classe de base du Module.
CaseOptionsArcaneCeaVerifier * options() const
Options du jeu de données du module.
void onExit() override
points d'entrée
VersionInfo versionInfo() const override
Version du module.
virtual String file(const String &file_name) const =0
Retourne le chemin complet du fichier file_name dans le répertoire.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual bool isParallel() const =0
Retourne true si l'exécution est parallèle.
virtual IParallelMng * parallelMng()=0
Retourne le gestionnaire de parallélisme.
virtual const IDirectory & exportDirectory() const =0
Répertoire de base des exportations.
Informations pour construire un module.
void addObserver(T *obj, void(T::*func)(const IObservable &), IObservable *oba)
Ajoute un observateur.
Classe utilitaire pour instantier un service d'une interface donnée.
Ref< InterfaceType > createReference(const String &name, eServiceBuilderProperties properties=SB_None)
Créé une instance implémentant l'interface InterfaceType.
Informations sur une version.
Référence à une instance.
Chaîne de caractères unicode.
bool empty() const
Vrai si la chaîne est vide (nulle ou "")
bool null() const
Retourne true si la chaîne est nulle.
TraceMessage pwarning() const
TraceMessage info() const
Flot pour un message d'information.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.