Main module. More...
#include <arcane/core/ModuleMaster.h>
Public Member Functions | |
| ModuleMaster (const ModuleBuildInfo &) | |
| Constructor. | |
| ~ModuleMaster () override | |
| Destructor. | |
| VersionInfo | versionInfo () const override |
| Module version. | |
| CaseOptionsMain * | caseoptions () override |
| Access to module options. | |
| IModule * | toModule () override |
| Conversion to IModule. | |
| CommonVariables * | commonVariables () override |
| Access to 'common' variables shared between all services and modules. | |
| void | addTimeLoopService (ITimeLoopService *tls) override |
| Adds the time loop service. | |
| void | dumpStandardCurves () override |
| Dumps standard curves (CPUTime, ElapsedTime, ...). | |
| void | timeLoopBegin () |
| Auto-loaded entry point at the beginning of the calculation loop iteration. | |
| void | timeLoopEnd () |
| Auto-loaded entry point at the end of the calculation loop iteration. | |
| void | masterInit () |
| Auto-loaded entry point at the beginning of initialization. | |
| void | masterStartInit () |
| Auto-loaded entry point at the beginning of a new case initialization. | |
| void | masterContinueInit () |
| Auto-loaded entry point at the beginning of a new case restart. | |
| Public Member Functions inherited from Arcane::AbstractModule | |
| AbstractModule (const ModuleBuildInfo &) | |
| Constructor from a ModuleBuildInfo. | |
| virtual | ~AbstractModule () |
| Destructor. | |
| String | name () const override |
| Module name. | |
| ISession * | session () const override |
| Session associated with the module. | |
| ISubDomain * | subDomain () const override |
| Sub-domain associated with the module. | |
| IMesh * | defaultMesh () const override |
| Default mesh for this module. | |
| MeshHandle | defaultMeshHandle () const override |
| Default mesh for this module. | |
| IParallelMng * | parallelMng () const override |
| Message passing parallelism manager. | |
| IAcceleratorMng * | acceleratorMng () const override |
| Accelerator manager. | |
| ITraceMng * | traceMng () const override |
| Trace manager. | |
| void | setUsed (bool v) override |
| Sets the module usage flag. | |
| bool | used () const override |
| Returns the module usage status. | |
| void | setDisabled (bool v) override |
| Sets the module activation flag. | |
| bool | disabled () const override |
| Returns the module activation status. | |
| bool | isGarbageCollected () const override |
| Indicates if the module uses a Garbage collection system. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
| Public Member Functions inherited from Arcane::IModule | |
| virtual | ~IModule () |
| Destructor. | |
| Public Member Functions inherited from Arcane::CommonVariables | |
| CommonVariables (IModule *c) | |
| Constructs the references of the common variables for the module c. | |
| CommonVariables (IVariableMng *variable_mng) | |
| Constructs the references of the common variables for the manager variable_mng. | |
| CommonVariables (ISubDomain *sd) | |
| Constructs the references of the common variables for the subdomain sd. | |
| virtual | ~CommonVariables () |
| Releases resources. | |
| Int32 | globalIteration () const |
| Current iteration number. | |
| Real | globalTime () const |
| Current time. | |
| Real | globalOldTime () const |
| Previous current time. | |
| Real | globalFinalTime () const |
| Final time of the simulation. | |
| Real | globalDeltaT () const |
| Current Delta T. | |
| Real | globalCPUTime () const |
| CPU time used (in seconds). | |
| Real | globalOldCPUTime () const |
| Previous CPU time used (in seconds). | |
| Real | globalElapsedTime () const |
| Clock time (elapsed) used (in seconds). | |
| Real | globalOldElapsedTime () const |
| Previous clock time (elapsed) used (in seconds). | |
| Public Member Functions inherited from Arcane::IModuleMaster | |
| virtual | ~IModuleMaster () |
| Destructor. | |
Protected Member Functions | |
| virtual void | timeIncrementation () |
| Overridable time step incrementation. | |
| virtual void | timeStepInformation () |
| Overridable display of time step information. | |
| void | _masterBeginLoop () |
| void | _masterEndLoop () |
| void | _masterStartInit () |
| void | _masterContinueInit () |
| void | _masterLoopExit () |
| void | _masterMeshChanged () |
| void | _masterRestore () |
| Protected Member Functions inherited from Arcane::AbstractModule | |
| void | _setVersionInfo (const VersionInfo &vi) |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Protected Attributes | |
| CaseOptionsMain * | m_case_options_main = nullptr |
| Instance of module options. | |
| Integer | m_nb_loop = 0 |
| Number of calculation loops performed. | |
| Real | m_old_cpu_time = 0.0 |
| CPU time value at the last iteration. | |
| Real | m_old_elapsed_time = 0.0 |
| Clock time value at the last iteration. | |
| UniqueArray< ITimeLoopService * > | m_timeloop_services |
| List of time loop services. | |
| bool | m_is_first_loop = true |
| Indicates if we are in the first execution loop. | |
| Real | m_thm_mem_used = 0.0 |
| Real | m_thm_diff_cpu = 0.0 |
| Real | m_thm_global_cpu_time = 0.0 |
| Real | m_thm_diff_elapsed = 0.0 |
| Real | m_thm_global_elapsed_time = 0.0 |
| Real | m_thm_global_time = 0.0 |
| bool | m_has_thm_dump_at_iteration = false |
Private Member Functions | |
| void | _dumpTimeInfo () |
Additional Inherited Members | |
| Static Public Member Functions inherited from Arcane::AbstractModule | |
| static void | staticInitialize (ISubDomain *sd) |
| Initialization of the module for the sub-domain sd. | |
| Static Public Member Functions inherited from Arcane::IModuleMaster | |
| static IModuleMaster * | createDefault (const ModuleBuildInfo &) |
| Creation of an instance of IModuleMaster. | |
| Public Attributes inherited from Arcane::CommonVariables | |
| VariableScalarInt32 | m_global_iteration |
| Current iteration. | |
| VariableScalarReal | m_global_time |
| Current time. | |
| VariableScalarReal | m_global_deltat |
| Global Delta T. | |
| VariableScalarReal | m_global_old_time |
| Time previous to the current time. | |
| VariableScalarReal | m_global_old_deltat |
| Delta T at the time previous to the global time. | |
| VariableScalarReal | m_global_final_time |
| Final time of the case. | |
| VariableScalarReal | m_global_old_cpu_time |
| Previous CPU time used (in seconds). | |
| VariableScalarReal | m_global_cpu_time |
| CPU time used (in seconds). | |
| VariableScalarReal | m_global_old_elapsed_time |
| Previous clock time used (in seconds). | |
| VariableScalarReal | m_global_elapsed_time |
| Clock time used (in seconds). | |
Main module.
This module is always loaded first so that these entry points encompass all those of other modules. It contains the global case variables, such as the filename or the iteration number.
Definition at line 42 of file ModuleMaster.h.
|
explicit |
Constructor.
Definition at line 58 of file ModuleMaster.cc.
References Arcane::AbstractModule::AbstractModule(), Arcane::addEntryPoint(), Arcane::ISubDomain::caseMng(), Arcane::CommonVariables::CommonVariables(), m_case_options_main, masterContinueInit(), masterInit(), masterStartInit(), Arcane::IEntryPoint::PAutoLoadBegin, Arcane::IEntryPoint::PAutoLoadEnd, Arcane::ModuleBuildInfo::subDomain(), timeLoopBegin(), timeLoopEnd(), Arcane::IEntryPoint::WComputeLoop, Arcane::IEntryPoint::WContinueInit, Arcane::IEntryPoint::WInit, Arcane::IEntryPoint::WOnMeshChanged, Arcane::IEntryPoint::WRestore, and Arcane::IEntryPoint::WStartInit.
|
override |
|
protected |
Definition at line 379 of file ModuleMaster.cc.
|
protected |
Definition at line 415 of file ModuleMaster.cc.
|
protected |
Definition at line 391 of file ModuleMaster.cc.
|
protected |
Definition at line 427 of file ModuleMaster.cc.
|
protected |
Definition at line 439 of file ModuleMaster.cc.
|
protected |
Definition at line 451 of file ModuleMaster.cc.
|
protected |
Definition at line 403 of file ModuleMaster.cc.
|
overridevirtual |
Adds the time loop service.
Implements Arcane::IModuleMaster.
Definition at line 370 of file ModuleMaster.cc.
References m_timeloop_services.
|
inlineoverridevirtual |
Access to module options.
Implements Arcane::IModuleMaster.
Definition at line 61 of file ModuleMaster.h.
References m_case_options_main.
|
inlineoverridevirtual |
Access to 'common' variables shared between all services and modules.
Implements Arcane::IModuleMaster.
Definition at line 67 of file ModuleMaster.h.
References Arcane::CommonVariables::CommonVariables().
|
overridevirtual |
Dumps standard curves (CPUTime, ElapsedTime, ...).
Implements Arcane::IModuleMaster.
Definition at line 320 of file ModuleMaster.cc.
References Arcane::ITimeHistoryMng::addValue(), Arcane::platform::getCPUTime(), Arcane::platform::getCurrentDateTime(), Arcane::platform::getMemoryUsed(), Arcane::platform::getRealTime(), Arcane::TraceAccessor::info(), Arcane::CommonVariables::m_global_cpu_time, Arcane::CommonVariables::m_global_elapsed_time, Arcane::CommonVariables::m_global_time, m_old_cpu_time, m_old_elapsed_time, Arcane::AbstractModule::subDomain(), and Arcane::ISubDomain::timeHistoryMng().
Referenced by timeLoopEnd().
| void Arcane::ModuleMaster::masterContinueInit | ( | ) |
Auto-loaded entry point at the beginning of a new case restart.
Definition at line 137 of file ModuleMaster.cc.
References Arcane::ISubDomain::caseMng(), Arcane::TraceAccessor::info(), Arcane::CommonVariables::m_global_iteration, Arcane::CommonVariables::m_global_old_deltat, Arcane::CommonVariables::m_global_old_time, Arcane::AbstractModule::subDomain(), and Arcane::ICaseMng::updateOptions().
Referenced by ModuleMaster().
| void Arcane::ModuleMaster::masterInit | ( | ) |
Auto-loaded entry point at the beginning of initialization.
Definition at line 129 of file ModuleMaster.cc.
Referenced by ModuleMaster().
| void Arcane::ModuleMaster::masterStartInit | ( | ) |
Auto-loaded entry point at the beginning of a new case initialization.
Is not called in case of initialization on a restart
Definition at line 107 of file ModuleMaster.cc.
References Arcane::ISubDomain::caseMng(), Arcane::CommonVariables::m_global_cpu_time, Arcane::CommonVariables::m_global_elapsed_time, Arcane::CommonVariables::m_global_iteration, Arcane::CommonVariables::m_global_old_cpu_time, Arcane::CommonVariables::m_global_old_deltat, Arcane::CommonVariables::m_global_old_elapsed_time, Arcane::CommonVariables::m_global_old_time, Arcane::CommonVariables::m_global_time, Arcane::AbstractModule::subDomain(), and Arcane::ICaseMng::updateOptions().
Referenced by ModuleMaster().
|
protectedvirtual |
Overridable time step incrementation.
Definition at line 158 of file ModuleMaster.cc.
References Arcane::CommonVariables::m_global_deltat, and Arcane::CommonVariables::m_global_time.
Referenced by timeLoopBegin().
| void Arcane::ModuleMaster::timeLoopBegin | ( | ) |
Auto-loaded entry point at the beginning of the calculation loop iteration.
Definition at line 185 of file ModuleMaster.cc.
References Arcane::ISubDomain::allReplicaParallelMng(), Arcane::ISubDomain::caseMng(), Arcane::IParallelMng::commSize(), Arcane::IParallelMng::computeMinMaxSum(), Arcane::platform::getCPUTime(), Arcane::platform::getCurrentDateTime(), Arcane::platform::getMemoryUsed(), Arcane::platform::getOnlineDebuggerService(), Arcane::platform::getRealTime(), Arcane::TraceAccessor::info(), Arcane::CommonVariables::m_global_cpu_time, Arcane::CommonVariables::m_global_deltat, Arcane::CommonVariables::m_global_elapsed_time, Arcane::CommonVariables::m_global_iteration, Arcane::CommonVariables::m_global_old_cpu_time, Arcane::CommonVariables::m_global_old_elapsed_time, Arcane::CommonVariables::m_global_old_time, Arcane::CommonVariables::m_global_time, m_is_first_loop, m_nb_loop, m_old_cpu_time, m_old_elapsed_time, Arcane::AbstractModule::parallelMng(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceMax, Arcane::AbstractModule::subDomain(), timeIncrementation(), timeStepInformation(), and Arcane::ICaseMng::updateOptions().
Referenced by ModuleMaster().
| void Arcane::ModuleMaster::timeLoopEnd | ( | ) |
Auto-loaded entry point at the end of the calculation loop iteration.
Definition at line 293 of file ModuleMaster.cc.
References dumpStandardCurves(), Arcane::TraceAccessor::info(), Arcane::CommonVariables::m_global_iteration, and Arcane::AbstractModule::subDomain().
Referenced by ModuleMaster().
|
protectedvirtual |
Overridable display of time step information.
Definition at line 167 of file ModuleMaster.cc.
References Arcane::TraceAccessor::info(), Arcane::CommonVariables::m_global_deltat, Arcane::CommonVariables::m_global_iteration, Arcane::CommonVariables::m_global_time, and m_nb_loop.
Referenced by timeLoopBegin().
|
inlineoverridevirtual |
Conversion to IModule.
Implements Arcane::IModuleMaster.
Definition at line 64 of file ModuleMaster.h.
|
inlineoverridevirtual |
Module version.
Reimplemented from Arcane::AbstractModule.
Definition at line 58 of file ModuleMaster.h.
|
protected |
Instance of module options.
Definition at line 126 of file ModuleMaster.h.
Referenced by caseoptions(), ModuleMaster(), and ~ModuleMaster().
|
protected |
Definition at line 150 of file ModuleMaster.h.
|
protected |
Indicates if we are in the first execution loop.
Definition at line 141 of file ModuleMaster.h.
Referenced by timeLoopBegin().
|
protected |
Number of calculation loops performed.
Definition at line 129 of file ModuleMaster.h.
Referenced by timeLoopBegin(), and timeStepInformation().
|
protected |
CPU time value at the last iteration.
Definition at line 132 of file ModuleMaster.h.
Referenced by dumpStandardCurves(), and timeLoopBegin().
|
protected |
Clock time value at the last iteration.
Definition at line 135 of file ModuleMaster.h.
Referenced by dumpStandardCurves(), and timeLoopBegin().
|
protected |
Definition at line 144 of file ModuleMaster.h.
|
protected |
Definition at line 146 of file ModuleMaster.h.
|
protected |
Definition at line 145 of file ModuleMaster.h.
|
protected |
Definition at line 147 of file ModuleMaster.h.
|
protected |
Definition at line 148 of file ModuleMaster.h.
|
protected |
Definition at line 143 of file ModuleMaster.h.
|
protected |
List of time loop services.
Definition at line 138 of file ModuleMaster.h.
Referenced by addTimeLoopService().