Kernel Manager¶
The KernelManager in NEST manages the initialization and finalization of all simulation managers in a specific order to resolve dependencies and ensure proper setup. It acts as a singleton, providing centralized control over configuration, status queries, and simulation resets. Additionally, it tracks a fingerprint to detect changes and maintain consistency across multiple runs.
-
class KernelManager¶
Public Functions
-
void initialize()¶
Prepare kernel for operation.
This method calls the initialization methods of the specific managers in the proper order.
See also
-
void finalize()¶
Take down kernel after operation.
This method calls the finalization methods of the specific managers in the proper order, i.e., inverse to initialize().
See also
-
void reset()¶
Reset kernel.
Resets the kernel by finalizing and initializing all managers.
See also
-
void change_number_of_threads(size_t new_num_threads)¶
Change number of threads.
Set the new number of threads on all managers by calling change_number_of_threads() on each of them.
-
inline bool is_initialized() const¶
Returns true if kernel is initialized.
-
void write_to_dump(const std::string &msg)¶
Write data to file per rank and thread.
For use with FULL_LOGGING.
Note
This method has a
omp criticalsection to avoid write-collisions from threads.
-
inline Stopwatch<StopwatchGranularity::Detailed, StopwatchParallelism::Threaded> &get_omp_synchronization_construction_stopwatch()¶
Get the stopwatch to measure the time each thread is idle during network construction.
-
inline Stopwatch<StopwatchGranularity::Detailed, StopwatchParallelism::Threaded> &get_omp_synchronization_simulation_stopwatch()¶
Get the stopwatch to measure the time each thread is idle during simulation.
Public Static Functions
-
static void create_kernel_manager()¶
Create/destroy and access the KernelManager singleton.
-
void initialize()¶