14#include "arcane/std/ArcaneSession.h"
16#include "arcane/utils/PlatformUtils.h"
17#include "arcane/utils/Collection.h"
18#include "arcane/utils/ITraceMng.h"
19#include "arcane/utils/StringBuilder.h"
21#include "arcane/IParallelMng.h"
22#include "arcane/IParallelSuperMng.h"
23#include "arcane/IParallelReplication.h"
24#include "arcane/Directory.h"
25#include "arcane/IXmlDocumentHolder.h"
26#include "arcane/ISubDomain.h"
27#include "arcane/ITimeLoopMng.h"
28#include "arcane/IApplication.h"
29#include "arcane/IRessourceMng.h"
30#include "arcane/XmlNode.h"
31#include "arcane/CommonVariables.h"
32#include "arcane/IIOMng.h"
33#include "arcane/ApplicationBuildInfo.h"
45ArcaneSession(IApplication* application)
48, m_case_name(
"output")
79 m_listing_directory =
Directory(m_output_directory,
"listing");
86 m_output_directory.createDirectory();
87 m_listing_directory.createDirectory();
99 sd->setCaseName(m_case_name);
101 sd->setExportDirectory(m_output_directory);
102 sd->setStorageDirectory(m_output_directory);
103 sd->setListingDirectory(m_listing_directory);
105 setLogAndErrorFiles(
sd);
119 if (!platform::getEnvironmentVariable(
"ARCANE_DISABLE_LOG").null()){
129 Int32
sid =
sd->subDomainId();
141 m_listing_directory.createDirectory();
171 info() <<
"Error output file '" << file <<
"'";
172 platform::removeFile(file);
173 tm->setErrorFileName(file);
178 tm->
info() <<
"Logs are disabled because environment variable ARCANE_DISABLE_LOG is set";
184 platform::removeFile(file);
185 tm->setLogFileName(file);
196 if (
psm->commRank()!=0)
199 _checkExecInfoFile();
208 execution.createAndAppendElement(
"return-value",String::fromNumber(
ret_val));
210 execution.createAndAppendElement(
"date",platform::getCurrentDateTime());
217 if (
sd->isInitialized()){
230 String file(m_listing_directory.file(
"coderesult.xml"));
231 logdate() <<
"Info output in 'coderesult.xml'";
232 IIOMng* io_mng = _application()->ioMng();
233 io_mng->writeXmlFile(m_result_doc,file);
242 _writeExecInfoFile(-1);
254 m_result_doc = _application()->ressourceMng()->createXmlDocument();
262 config.createAndAppendElement(
"case-name",m_case_name);
263 config.createAndAppendElement(
"host",platform::getHostName());
264 config.createAndAppendElement(
"pid",String::fromNumber(platform::getProcessId()));
Variables communes d'un cas.
Real globalCPUTime() const
Temps CPU utilisé (en seconde)
Real globalDeltaT() const
Delta T courant.
Real globalTime() const
Temps courant.
Int32 globalIteration() const
Numéro de l'itération courante.
Real globalFinalTime() const
Temps final de la simulation.
Classe gérant un répertoire.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual IParallelReplication * replication() const =0
Informations sur la réplication.
Informations sur la réplication des sous-domaines en parallèle.
virtual bool hasReplication() const =0
Indique si la réplication est active.
virtual Int32 replicationRank() const =0
Rang dans la réplication (de 0 à nbReplication()-1)
virtual Int32 nbReplication() const =0
Nombre de réplication.
Classe abstraite du superviseur de parallélisme.
Interface du gestionnaire d'un sous-domaine.
Interface du gestionnaire de la boucle en temps.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Interface du gestionnaire de traces.
Constructeur de chaîne de caractère unicode.
Chaîne de caractères unicode.
ITraceMng * traceMng() const
Gestionnaire de trace.
TraceMessage info() const
Flot pour un message d'information.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-