Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ArcaneMain Class Reference

Execution management class. More...

#include <arcane/impl/ArcaneMain.h>

Inheritance diagram for Arcane::ArcaneMain:
Collaboration diagram for Arcane::ArcaneMain:

Classes

class  Impl

Public Member Functions

 ArcaneMain (const ApplicationInfo &infos, IMainFactory *factory)
 ArcaneMain (const ApplicationInfo &app_info, IMainFactory *factory, const ApplicationBuildInfo &app_build_info, const DotNetRuntimeInitialisationInfo &dotnet_init_info, const AcceleratorRuntimeInitialisationInfo &accelerator_init_info)
void build () override
 Constructs the class members. The instance is not usable until this method has been called. This method must be called before initialize().
void initialize () override
 Initializes the instance. The instance is not usable until this method has been called.
bool parseArgs (StringList args) override
 Parses arguments.
int execute () override
 Starts execution. This method only returns when the program exits.
void doAbort () override
 Performs an abort.
void setErrorCode (int errcode) override
 Sets the return code.
int errorCode () const override
 Execution error code.
void finalize () override
 Performs the last operations before instance destruction.
const ApplicationInfoapplicationInfo () const override
 Executable information.
const ApplicationBuildInfoapplicationBuildInfo () const override
 Information to build the IApplication instance.
const DotNetRuntimeInitialisationInfodotnetRuntimeInitialisationInfo () const override
 .Net runtime initialization information.
const AcceleratorRuntimeInitialisationInfoacceleratorRuntimeInitialisationInfo () const override
 Runtime initialization information for accelerators.
IMainFactorymainFactory () const override
 Main factory.
IApplicationapplication () const override
 Application.
ServiceFactoryInfoCollection registeredServiceFactoryInfos () override
 List of registered service factories.
ModuleFactoryInfoCollection registeredModuleFactoryInfos () override
 List of registered module factories.
bool hasGarbageCollector () const override
 Indicates that certain objects are managed via a garbage collector.
void setDirectExecuteFunctor (IDirectSubDomainExecuteFunctor *f) override
IDirectSubDomainExecuteFunctor_directExecuteFunctor () const
Public Member Functions inherited from Arcane::IArcaneMain
virtual ~IArcaneMain ()
 Releases resources.

Static Public Member Functions

static int arcaneMain (const ApplicationInfo &app_info, IMainFactory *factory=nullptr)
 Entry point of the executable in Arcane.
static int run ()
 Entry point of the executable in Arcane.
static void arcaneInitialize ()
 Initializes Arcane.
static void arcaneFinalize ()
 Terminates Arcane usage.
static void setHasGarbageCollector ()
 Indicates that certain objects are managed by a garbage collector.
static void setHasDotNETRuntime ()
 Indicates that we are running in the .NET runtime.
static void setDefaultMainFactory (IMainFactory *mf)
 Sets the default factory.
static ApplicationInfodefaultApplicationInfo ()
 Default application info.
static DotNetRuntimeInitialisationInfodefaultDotNetRuntimeInitialisationInfo ()
 Information for .Net runtime initialization.
static AcceleratorRuntimeInitialisationInfodefaultAcceleratorRuntimeInitialisationInfo ()
 Information for accelerator initialization.
static ApplicationBuildInfodefaultApplicationBuildInfo ()
 Information for accelerator initialization.
static int callFunctorWithCatchedException (IFunctor *functor, IArcaneMain *amain, bool *clean_abort, bool is_print=true)
 Calls the functor functor while catching possible exceptions.
static void setExecuteOverrideFunctor (ArcaneMainExecutionOverrideFunctor *functor)
static bool hasDotNetWrapper ()
 Indicates if a '.Net' assembly is being executed from a C++ main.
static Real initializationTimeForAccelerator ()
 Returns the time (in seconds) for the initialization of accelerator runtimes for this process.
static void addServiceFactoryInfo (IServiceFactoryInfo *factory)
 Adds a service factory.
static void addModuleFactoryInfo (IModuleFactoryInfo *factory)
 Adds a module factory.
static void addApplicationBuildInfoVisitor (IApplicationBuildInfoVisitor *visitor)
 Adds a visitor to fill ApplicationBuildInfo.
static void redirectSignals ()
static bool isMasterIO ()
static void setUseTestLogger (bool v)
Static Public Member Functions inherited from Arcane::IArcaneMain
static IArcaneMainarcaneMain ()
static void setArcaneMain (IArcaneMain *arcane_main)

Protected Member Functions

IApplication_application ()
ApplicationBuildInfo_applicationBuildInfo ()

Static Protected Member Functions

static int _internalRun (IDirectSubDomainExecuteFunctor *func)

Private Member Functions

void _dumpHelp ()
void _parseApplicationBuildInfoArgs ()

Static Private Member Functions

static int _arcaneMain (const ApplicationInfo &, IMainFactory *)
 Executable entry point.
static void _launchMissingInitException ()
static void _checkHasInit ()
static int _runDotNet ()
static void _checkAutoDetectMPI ()
static int _checkAutoDetectAccelerator (bool &has_accelerator)
 Detects and loads accelerator runtime management.
static void _setArcaneLibraryPath ()
static int _initRuntimes ()
static int _checkTestLoggerResult ()

Private Attributes

Implm_p
IMainFactorym_main_factory = nullptr
IApplicationm_application = nullptr
int m_error_code = 0
IDirectSubDomainExecuteFunctorm_direct_sub_domain_execute_functor = nullptr

Static Private Attributes

static bool m_has_garbage_collector = false
static bool m_is_master_io = true
static bool m_is_use_test_logger = false
static IMainFactorym_default_main_factory = nullptr
static ArcaneMainExecutionOverrideFunctorm_exec_override_functor = nullptr
static std::atomic< Int32m_nb_arcane_init
 Number of times arcaneInitialize() has been called.
static std::atomic< Int32m_is_init_done
 1 if init finished, 0 otherwise

Friends

class ArcaneMainExecInfo
class ArcaneLauncher
class ArcaneMainAutoDetectRuntimeHelper

Detailed Description

Execution management class.

This class is internal to Arcane and should not be used directly. To initialize and execute the code, use the ArcaneLauncher class.

Definition at line 87 of file ArcaneMain.h.

Constructor & Destructor Documentation

◆ ArcaneMain() [1/2]

Arcane::ArcaneMain::ArcaneMain ( const ApplicationInfo & infos,
IMainFactory * factory )

Definition at line 1117 of file ArcaneMain.cc.

◆ ArcaneMain() [2/2]

Arcane::ArcaneMain::ArcaneMain ( const ApplicationInfo & app_info,
IMainFactory * factory,
const ApplicationBuildInfo & app_build_info,
const DotNetRuntimeInitialisationInfo & dotnet_init_info,
const AcceleratorRuntimeInitialisationInfo & accelerator_init_info )

Definition at line 1127 of file ArcaneMain.cc.

◆ ~ArcaneMain()

Arcane::ArcaneMain::~ArcaneMain ( )
override

Definition at line 1140 of file ArcaneMain.cc.

Member Function Documentation

◆ _application()

IApplication * Arcane::ArcaneMain::_application ( )
inlineprotected

Definition at line 341 of file ArcaneMain.h.

◆ _applicationBuildInfo()

ApplicationBuildInfo & Arcane::ArcaneMain::_applicationBuildInfo ( )
protected

Definition at line 837 of file ArcaneMain.cc.

◆ _arcaneMain()

int Arcane::ArcaneMain::_arcaneMain ( const ApplicationInfo & app_info,
IMainFactory * factory )
staticprivate

Executable entry point.

Definition at line 499 of file ArcaneMain.cc.

References Arcane::ArcaneMainExecInfo::initialize().

Referenced by arcaneMain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _checkAutoDetectAccelerator()

int Arcane::ArcaneMain::_checkAutoDetectAccelerator ( bool & has_accelerator)
staticprivate

Detects and loads accelerator runtime management.

In return, has_accelerator is true if an accelerator runtime was loaded.

Return values
0if everything is OK
Note
Do not call this method directly but go through ArcaneMainAutoDetectHelper.

Definition at line 1090 of file ArcaneMain.cc.

References Arcane::Accelerator::Impl::RuntimeLoader::loadRuntime().

Here is the call graph for this function:

◆ _checkAutoDetectMPI()

void Arcane::ArcaneMain::_checkAutoDetectMPI ( )
staticprivate

Definition at line 1048 of file ArcaneMain.cc.

◆ _checkHasInit()

void Arcane::ArcaneMain::_checkHasInit ( )
staticprivate

Definition at line 617 of file ArcaneMain.cc.

◆ _checkTestLoggerResult()

int Arcane::ArcaneMain::_checkTestLoggerResult ( )
staticprivate

Definition at line 914 of file ArcaneMain.cc.

◆ _directExecuteFunctor()

IDirectSubDomainExecuteFunctor * Arcane::ArcaneMain::_directExecuteFunctor ( ) const
inline

Definition at line 337 of file ArcaneMain.h.

◆ _dumpHelp()

void Arcane::ArcaneMain::_dumpHelp ( )
private

Definition at line 1352 of file ArcaneMain.cc.

◆ _initRuntimes()

int Arcane::ArcaneMain::_initRuntimes ( )
staticprivate

Definition at line 927 of file ArcaneMain.cc.

◆ _internalRun()

int Arcane::ArcaneMain::_internalRun ( IDirectSubDomainExecuteFunctor * func)
staticprotected

Definition at line 904 of file ArcaneMain.cc.

◆ _launchMissingInitException()

void Arcane::ArcaneMain::_launchMissingInitException ( )
staticprivate

Definition at line 607 of file ArcaneMain.cc.

◆ _parseApplicationBuildInfoArgs()

void Arcane::ArcaneMain::_parseApplicationBuildInfoArgs ( )
private

Definition at line 1178 of file ArcaneMain.cc.

◆ _runDotNet()

int Arcane::ArcaneMain::_runDotNet ( )
staticprivate

Definition at line 976 of file ArcaneMain.cc.

◆ _setArcaneLibraryPath()

void Arcane::ArcaneMain::_setArcaneLibraryPath ( )
staticprivate

Definition at line 682 of file ArcaneMain.cc.

◆ acceleratorRuntimeInitialisationInfo()

const AcceleratorRuntimeInitialisationInfo & Arcane::ArcaneMain::acceleratorRuntimeInitialisationInfo ( ) const
overridevirtual

Runtime initialization information for accelerators.

Implements Arcane::IArcaneMain.

Definition at line 855 of file ArcaneMain.cc.

◆ addApplicationBuildInfoVisitor()

void Arcane::ArcaneMain::addApplicationBuildInfoVisitor ( IApplicationBuildInfoVisitor * visitor)
static

Adds a visitor to fill ApplicationBuildInfo.

The pointer passed as an argument must remain valid until the call to arcaneMain(); The registered visitors are called just before the application is created.

Definition at line 783 of file ArcaneMain.cc.

Referenced by Arcane::arcaneAutoDetectMessagePassingServiceMPI().

Here is the caller graph for this function:

◆ addModuleFactoryInfo()

void Arcane::ArcaneMain::addModuleFactoryInfo ( IModuleFactoryInfo * factory)
static

Adds a module factory.

This method must be called before arcaneMain()

Definition at line 774 of file ArcaneMain.cc.

◆ addServiceFactoryInfo()

void Arcane::ArcaneMain::addServiceFactoryInfo ( IServiceFactoryInfo * factory)
static

Adds a service factory.

This method must be called before arcaneMain()

Definition at line 765 of file ArcaneMain.cc.

◆ application()

IApplication * Arcane::ArcaneMain::application ( ) const
inlineoverridevirtual

Application.

Implements Arcane::IArcaneMain.

Definition at line 332 of file ArcaneMain.h.

Referenced by Arcane::ArcaneMainBatch::doAbort(), and parseArgs().

Here is the caller graph for this function:

◆ applicationBuildInfo()

const ApplicationBuildInfo & Arcane::ArcaneMain::applicationBuildInfo ( ) const
overridevirtual

Information to build the IApplication instance.

Implements Arcane::IArcaneMain.

Definition at line 828 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneMainBatch::execute().

Here is the caller graph for this function:

◆ applicationInfo()

const ApplicationInfo & Arcane::ArcaneMain::applicationInfo ( ) const
overridevirtual

Executable information.

Implements Arcane::IArcaneMain.

Definition at line 1169 of file ArcaneMain.cc.

◆ arcaneFinalize()

void Arcane::ArcaneMain::arcaneFinalize ( )
static

Terminates Arcane usage.

This method must be called at the end of the execution. Once called, Arcane objects must no longer be used.

The call to run() manages the initialization and the call to this method. Therefore, it is generally not necessary to call this method directly.

See also
arcaneInitialize();

Removes our reference on ItemGroupImpl::shared_null.

Definition at line 730 of file ArcaneMain.cc.

References Arcane::ItemGroupImpl::_destroySharedNull(), Arcane::ItemTypeMng::_destroySingleton(), Arcane::IDynamicLibraryLoader::getDefault(), Arcane::FlexLMMng::instance(), m_is_init_done, m_nb_arcane_init, Arcane::platform::platformTerminate(), and Arcane::FlexLMMng::releaseAllLicenses().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ arcaneInitialize()

void Arcane::ArcaneMain::arcaneInitialize ( )
static

Initializes Arcane.

This method must be called before any use of an Arcane object. It can be called multiple times, in which case the method arcaneFinalize() must be called an equivalent number of times.

The call to run() triggers the initialization. Therefore, it is generally not necessary to call this method.

Definition at line 697 of file ArcaneMain.cc.

References Arcane::ItemGroupImpl::_buildSharedNull(), Arcane::ItemTypeMng::_singleton(), m_is_init_done, m_nb_arcane_init, Arcane::platform::platformInitialize(), Arcane::Convert::Impl::ConvertPolicy::setUseFromChars(), and Arcane::Exception::staticInit().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ arcaneMain()

int Arcane::ArcaneMain::arcaneMain ( const ApplicationInfo & app_info,
IMainFactory * factory = nullptr )
static

Entry point of the executable in Arcane.

Note
This method should not be called directly. It is preferable to use the ArcaneLauncher class to manage the execution launch.

This method performs the following calls:

Parameters
app_infoinformation about the executable.
factorybuilds architecture managers. If null, uses the factory specified by setDefaultMainFactory() otherwise a default factory is used.

The call to this method must be preceded by Initialize();

Return values
0if the execution proceeded without error
1in case of unknown error.
2in case of standard exception (std::exception)
3in case of architecture exception (IArcaneException)
4in case of fatal error in Arcane.

Definition at line 873 of file ArcaneMain.cc.

References _arcaneMain().

Here is the call graph for this function:

◆ build()

void Arcane::ArcaneMain::build ( )
overridevirtual

Constructs the class members. The instance is not usable until this method has been called. This method must be called before initialize().

Warning
This method must only be called once.

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 1157 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneMainBatch::build().

Here is the caller graph for this function:

◆ callFunctorWithCatchedException()

int Arcane::ArcaneMain::callFunctorWithCatchedException ( IFunctor * functor,
IArcaneMain * amain,
bool * clean_abort,
bool is_print = true )
static

Calls the functor functor while catching possible exceptions.

The return value clean_abort is true if the code stops cleanly, meaning that all processes and threads execute the same code in parallel. This is the case, for example, if all processes detect the same error and launch, for example, a ParallelFatalErrorException. In this case, is_print indicates whether this process or thread displays the error messages. If is_print is true, the error message is displayed, otherwise it is not.

If \ a clean_abort is false, it means that one of the processes or thread stops without the others knowing, which generally results in MPI_Abort in parallel.

Definition at line 522 of file ArcaneMain.cc.

References Arcane::IArcaneMain::application(), Arcane::ITraceMng::error(), Arcane::Exception::isCollective(), Arcane::IParallelSuperMng::isMasterIO(), Arcane::IParallelSuperMng::isParallel(), Arcane::IApplication::parallelSuperMng(), and Arcane::IBase::traceMng().

Here is the call graph for this function:

◆ defaultAcceleratorRuntimeInitialisationInfo()

AcceleratorRuntimeInitialisationInfo & Arcane::ArcaneMain::defaultAcceleratorRuntimeInitialisationInfo ( )
static

Information for accelerator initialization.

To be taken into account, this information must be modified before calling run() or rundDirect().

Definition at line 810 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneLauncher::acceleratorRuntimeInitialisationInfo(), and Arcane::ArcaneMainExecInfo::initialize().

Here is the caller graph for this function:

◆ defaultApplicationBuildInfo()

ApplicationBuildInfo & Arcane::ArcaneMain::defaultApplicationBuildInfo ( )
static

Information for accelerator initialization.

To be taken into account, this information must be modified before calling run() or rundDirect().

Definition at line 819 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneLauncher::applicationBuildInfo().

Here is the caller graph for this function:

◆ defaultApplicationInfo()

ApplicationInfo & Arcane::ArcaneMain::defaultApplicationInfo ( )
static

Default application info.

This method allows retrieving the instance of ApplicationInfo which will be used when calling arcaneMain() without arguments.

Therefore, this method should generally be called before calling run().

Definition at line 792 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneLauncher::applicationInfo(), and run().

Here is the caller graph for this function:

◆ defaultDotNetRuntimeInitialisationInfo()

DotNetRuntimeInitialisationInfo & Arcane::ArcaneMain::defaultDotNetRuntimeInitialisationInfo ( )
static

Information for .Net runtime initialization.

To be taken into account, this information must be modified before calling run().

Definition at line 801 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneLauncher::dotNetRuntimeInitialisationInfo(), Arcane::ArcaneMainExecInfo::initialize(), and run().

Here is the caller graph for this function:

◆ doAbort()

void Arcane::ArcaneMain::doAbort ( )
overridevirtual

Performs an abort.

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 1236 of file ArcaneMain.cc.

◆ dotnetRuntimeInitialisationInfo()

const DotNetRuntimeInitialisationInfo & Arcane::ArcaneMain::dotnetRuntimeInitialisationInfo ( ) const
overridevirtual

.Net runtime initialization information.

Implements Arcane::IArcaneMain.

Definition at line 846 of file ArcaneMain.cc.

◆ errorCode()

int Arcane::ArcaneMain::errorCode ( ) const
inlineoverridevirtual

Execution error code.

Implements Arcane::IArcaneMain.

Definition at line 322 of file ArcaneMain.h.

Referenced by Arcane::ArcaneMainBatch::finalize().

Here is the caller graph for this function:

◆ execute()

int Arcane::ArcaneMain::execute ( )
overridevirtual

Starts execution. This method only returns when the program exits.

Returns
the Arcane return code, 0 if everything is okay.

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 1227 of file ArcaneMain.cc.

◆ finalize()

void Arcane::ArcaneMain::finalize ( )
inlineoverridevirtual

Performs the last operations before instance destruction.

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 323 of file ArcaneMain.h.

◆ hasDotNetWrapper()

bool Arcane::ArcaneMain::hasDotNetWrapper ( )
static

Indicates if a '.Net' assembly is being executed from a C++ main.

Definition at line 668 of file ArcaneMain.cc.

◆ hasGarbageCollector()

bool Arcane::ArcaneMain::hasGarbageCollector ( ) const
inlineoverridevirtual

Indicates that certain objects are managed via a garbage collector.

Implements Arcane::IArcaneMain.

Definition at line 335 of file ArcaneMain.h.

◆ initializationTimeForAccelerator()

Real Arcane::ArcaneMain::initializationTimeForAccelerator ( )
static

Returns the time (in seconds) for the initialization of accelerator runtimes for this process.

Returns 0.0 if no accelerator runtime has been initialized.

Definition at line 864 of file ArcaneMain.cc.

Referenced by Arcane::Application::initialize().

Here is the caller graph for this function:

◆ initialize()

void Arcane::ArcaneMain::initialize ( )
overridevirtual

Initializes the instance. The instance is not usable until this method has been called.

Warning
This method must only be called once.

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 1197 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneMainBatch::initialize().

Here is the caller graph for this function:

◆ isMasterIO()

bool Arcane::ArcaneMain::isMasterIO ( )
inlinestatic

Definition at line 311 of file ArcaneMain.h.

◆ mainFactory()

IMainFactory * Arcane::ArcaneMain::mainFactory ( ) const
inlineoverridevirtual

Main factory.

Implements Arcane::IArcaneMain.

Definition at line 331 of file ArcaneMain.h.

◆ parseArgs()

bool Arcane::ArcaneMain::parseArgs ( StringList args)
overridevirtual

Parses arguments.

Recognized arguments must be removed from the list.

Return values
trueif execution must stop,
falseif it continues normally

Implements Arcane::IArcaneMain.

Reimplemented in Arcane::ArcaneMainBatch.

Definition at line 1263 of file ArcaneMain.cc.

References application(), Arcane::CollectionBase::clear(), Arcane::CollectionBase::count(), Arcane::InternalInfosDumper::dumpArcaneDatabase(), Arcane::InternalInfosDumper::dumpInternalAllInfos(), and Arcane::String::null().

Referenced by Arcane::ArcaneMainBatch::parseArgs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ redirectSignals()

void Arcane::ArcaneMain::redirectSignals ( )
static

Definition at line 230 of file ArcaneMain.cc.

◆ registeredModuleFactoryInfos()

ModuleFactoryInfoCollection Arcane::ArcaneMain::registeredModuleFactoryInfos ( )
overridevirtual

List of registered module factories.

Implements Arcane::IArcaneMain.

Definition at line 1218 of file ArcaneMain.cc.

◆ registeredServiceFactoryInfos()

ServiceFactoryInfoCollection Arcane::ArcaneMain::registeredServiceFactoryInfos ( )
overridevirtual

List of registered service factories.

Implements Arcane::IArcaneMain.

Definition at line 1209 of file ArcaneMain.cc.

◆ run()

int Arcane::ArcaneMain::run ( )
static

Entry point of the executable in Arcane.

This method calls arcaneMain(const ApplicationInfo&,IMainFactory*) using the values of defaultApplicationInfo() and the factory specified during calls to setDefaultMainFactory().

Definition at line 937 of file ArcaneMain.cc.

References arcaneFinalize(), arcaneInitialize(), Arcane::IArcaneMain::arcaneMain(), defaultApplicationInfo(), defaultDotNetRuntimeInitialisationInfo(), Arcane::platform::getEnvironmentVariable(), and Arcane::platform::hasDotNETRuntime().

Referenced by Arcane::ArcaneLauncher::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDefaultMainFactory()

void Arcane::ArcaneMain::setDefaultMainFactory ( IMainFactory * mf)
static

Sets the default factory.

This method sets the default factory used if none is specified in the call to arcaneMain().

This method must be called before arcaneMain().

Definition at line 253 of file ArcaneMain.cc.

Referenced by Arcane::ArcaneLauncher::setDefaultMainFactory().

Here is the caller graph for this function:

◆ setDirectExecuteFunctor()

void Arcane::ArcaneMain::setDirectExecuteFunctor ( IDirectSubDomainExecuteFunctor * f)
inlineoverridevirtual

Implements Arcane::IArcaneMain.

Definition at line 336 of file ArcaneMain.h.

◆ setErrorCode()

void Arcane::ArcaneMain::setErrorCode ( int errcode)
overridevirtual

Sets the return code.

Implements Arcane::IArcaneMain.

Definition at line 1245 of file ArcaneMain.cc.

References Arcane::String::localstr().

Here is the call graph for this function:

◆ setExecuteOverrideFunctor()

void Arcane::ArcaneMain::setExecuteOverrideFunctor ( ArcaneMainExecutionOverrideFunctor * functor)
static

brief Execution functor.

This optional method allows setting a functor that will be called instead of execute(). This functor is called once the application is initialized.

Since the call to this functor replaces normal execution, only one IApplication instance is available. There is no subdomain, session, or mesh available.

Definition at line 659 of file ArcaneMain.cc.

◆ setHasDotNETRuntime()

void Arcane::ArcaneMain::setHasDotNETRuntime ( )
static

Indicates that we are running in the .NET runtime.

This property can only be set at the start of the calculation, before calling arcaneInitialize().

Definition at line 646 of file ArcaneMain.cc.

References m_nb_arcane_init, and Arcane::platform::setHasDotNETRuntime().

Here is the call graph for this function:

◆ setHasGarbageCollector()

void Arcane::ArcaneMain::setHasGarbageCollector ( )
static

Indicates that certain objects are managed by a garbage collector.

This property can only be set at the start of the calculation, before calling arcaneInitialize().

Definition at line 633 of file ArcaneMain.cc.

References m_nb_arcane_init.

◆ setUseTestLogger()

void Arcane::ArcaneMain::setUseTestLogger ( bool v)
static

Definition at line 244 of file ArcaneMain.cc.

◆ ArcaneLauncher

friend class ArcaneLauncher
friend

Definition at line 91 of file ArcaneMain.h.

◆ ArcaneMainAutoDetectRuntimeHelper

friend class ArcaneMainAutoDetectRuntimeHelper
friend

Definition at line 92 of file ArcaneMain.h.

◆ ArcaneMainExecInfo

friend class ArcaneMainExecInfo
friend

Definition at line 90 of file ArcaneMain.h.

Member Data Documentation

◆ m_application

IApplication* Arcane::ArcaneMain::m_application = nullptr
private

Definition at line 349 of file ArcaneMain.h.

◆ m_default_main_factory

IMainFactory * Arcane::ArcaneMain::m_default_main_factory = nullptr
staticprivate

Definition at line 355 of file ArcaneMain.h.

◆ m_direct_sub_domain_execute_functor

IDirectSubDomainExecuteFunctor* Arcane::ArcaneMain::m_direct_sub_domain_execute_functor = nullptr
private

Definition at line 351 of file ArcaneMain.h.

◆ m_error_code

int Arcane::ArcaneMain::m_error_code = 0
private

Definition at line 350 of file ArcaneMain.h.

◆ m_exec_override_functor

ArcaneMainExecutionOverrideFunctor * Arcane::ArcaneMain::m_exec_override_functor = nullptr
staticprivate

Definition at line 356 of file ArcaneMain.h.

◆ m_has_garbage_collector

bool Arcane::ArcaneMain::m_has_garbage_collector = false
staticprivate

Definition at line 352 of file ArcaneMain.h.

◆ m_is_init_done

std::atomic< Int32 > Arcane::ArcaneMain::m_is_init_done
staticprivate

1 if init finished, 0 otherwise

Definition at line 366 of file ArcaneMain.h.

Referenced by arcaneFinalize(), and arcaneInitialize().

◆ m_is_master_io

bool Arcane::ArcaneMain::m_is_master_io = true
staticprivate

Definition at line 353 of file ArcaneMain.h.

◆ m_is_use_test_logger

bool Arcane::ArcaneMain::m_is_use_test_logger = false
staticprivate

Definition at line 354 of file ArcaneMain.h.

◆ m_main_factory

IMainFactory* Arcane::ArcaneMain::m_main_factory = nullptr
private

Definition at line 348 of file ArcaneMain.h.

◆ m_nb_arcane_init

std::atomic< Int32 > Arcane::ArcaneMain::m_nb_arcane_init
staticprivate

Number of times arcaneInitialize() has been called.

Definition at line 364 of file ArcaneMain.h.

Referenced by arcaneFinalize(), arcaneInitialize(), setHasDotNETRuntime(), and setHasGarbageCollector().

◆ m_p

Impl* Arcane::ArcaneMain::m_p
private

Definition at line 347 of file ArcaneMain.h.


The documentation for this class was generated from the following files: