14#include "arcane/launcher/StandaloneSubDomain.h"
16#include "arccore/base/internal/ProfilingInternal.h"
18#include "arcane/utils/Ref.h"
19#include "arcane/utils/ITraceMng.h"
20#include "arcane/utils/FatalErrorException.h"
21#include "arcane/utils/Exception.h"
23#include "arcane/impl/ArcaneSimpleExecutor.h"
25#include "arcane/core/ISubDomain.h"
27#include "arcane/launcher/ArcaneLauncher.h"
43 StandaloneSubDomain::_notifyRemoveStandaloneSubDomain();
48 int r = m_simple_exec.initialize();
51 m_sub_domain = m_simple_exec.createSubDomain(case_file_name, file_content);
52 m_trace_mng =
makeRef(m_sub_domain->traceMng());
59 std::ostringstream ostr;
60 ::Arcane::Impl::dumpProfilingStatistics(ostr);
61 if (m_trace_mng.get())
62 m_trace_mng->info() << ostr.str();
64 std::cout << ostr.str() <<
"\n";
85void StandaloneSubDomain::
90 ARCANE_FATAL(
"Instance of 'StandaloneSubDomain' is not initialized.\n"
91 "You have to call ArcaneLauncher::createStandaloneSubDomain()\n"
92 "to get a valid instance");
101 _checkIsInitialized();
102 return m_p->m_trace_mng.get();
111 _checkIsInitialized();
112 return m_p->m_sub_domain;
118void StandaloneSubDomain::
122 m_p->init(case_file_name, file_content);
128bool StandaloneSubDomain::
137void StandaloneSubDomain::
138_notifyRemoveStandaloneSubDomain()
140 ArcaneLauncher::_notifyRemoveStandaloneSubDomain();
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Class for directly executing code without going through the time loop.
Interface of the subdomain manager.
Reference to an instance.
View of an array of elements of type T.
ITraceMng * traceMng()
Associated trace manager.
StandaloneSubDomain()
Uninitialized constructor.
ISubDomain * subDomain()
Sub-domain.
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Integer arcaneCallFunctionAndCatchException(std::function< void()> function)
Calls the function function while catching potential exceptions.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.