![]() |
The ROme OpTimistic Simulator
2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Core ROOT-Sim functionalities. More...
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
#include <signal.h>
#include <arch/thread.h>
#include <core/core.h>
#include <core/init.h>
#include <scheduler/process.h>
#include <scheduler/scheduler.h>
#include <statistics/statistics.h>
#include <gvt/gvt.h>
#include <mm/mm.h>
Go to the source code of this file.
Functions | |
void | exit_from_simulation_model (void) |
bool | user_requested_exit (void) |
static void | handle_signal (int signum) |
void | base_init (void) |
void | base_fini (void) |
unsigned int | find_kernel_by_gid (GID_t gid) |
void | simulation_shutdown (int code) |
bool | simulation_error (void) |
void | _rootsim_error (bool fatal, const char *msg,...) |
void | distribute_lps_on_kernels (void) |
void | initialization_complete (void) |
Variables | |
barrier_t | all_thread_barrier |
Barrier for all worker threads. | |
unsigned int * | kernel |
Mapping between kernel instances and logical processes. | |
unsigned int | kid |
Identifier of the local kernel. | |
unsigned int | n_ker |
Total number of simulation kernel instances running. | |
unsigned int | n_cores |
Total number of cores required for simulation. | |
unsigned int | n_prc_tot |
Total number of logical processes running in the simulation. More... | |
unsigned int | n_prc |
Number of logical processes hosted by the current kernel instance. | |
simulation_configuration | rootsim_config |
This global variable holds the configuration for the current simulation. | |
static bool | sim_error = false |
Flag to notify all workers that there was an error. | |
bool | exit_silently_from_kernel = false |
This flag tells whether we are exiting from the kernel of from userspace. | |
static bool | init_complete = false |
This flag is set when the initialization of the simulator is complete, with no errors. | |
bool | user_exit_flag = false |
Core ROOT-Sim functionalities.
Core ROOT-Sim functionalities
This file is part of ROOT-Sim (ROme OpTimistic Simulator).
ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.
ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file core.c.
void _rootsim_error | ( | bool | fatal, |
const char * | msg, | ||
... | |||
) |
A variadic function which prints out error messages. If the errors are marked as fatal, the simulation is correctly shut down.
fatal | This flag marks an error as fatal (true) or not (false) |
msg | The error message to be printed out. This can be specified as in the printf() format message, thus a matching number of extra parameters can be passed. |
void base_fini | ( | void | ) |
void base_init | ( | void | ) |
void distribute_lps_on_kernels | ( | void | ) |
void exit_from_simulation_model | ( | void | ) |
This function is used to terminate with not much pain the simulation if the user model inadvertently calls exit(). It displays a warning message, and then tries to silently shutdown. The software enters this function using the standard atexit() API.
Definition at line 91 of file core.c.
unsigned int find_kernel_by_gid | ( | GID_t | gid | ) |
void initialization_complete | ( | void | ) |
void simulation_shutdown | ( | int | code | ) |