ROOT-Sim core 3.0.0
Brought to you by the High Performance and Dependable Computing Systems (HPDCS) Research Group
The ROme OpTimistic Simulator
The ROme OpTimistic Simulator is an open-source, distributed and parallel simulation framework developed using C11. It transparently supports all the mechanisms associated with parallelization and distribution of workload across the nodes (e.g., mapping of simulation objects on different kernel instances) and optimistic synchronization (e.g., state recoverability). Distributed simulations rely on MPI3. In particular, global synchronization across the various nodes relies on asynchronous MPI primitives for increased efficiency.
The programming model supported by ROOT-Sim allows the simulation model developer to use a simple application-callback
function named ProcessEvent()
as the event handler. Its parameters determine which simulation object is currently
taking control for processing its next event and where the state of this object is located in memory. An object is a
data structure whose state can be scattered on dynamically allocated memory chunks. Hence, the memory address passed to
the callback identifies a top-level data structure implementing the object state layout.
ROOT-Sim’s development started as a research project late back in 1987 and is currently maintained by the High Performance and Dependable Computing Systems group, a research group of the University of Rome “Tor Vergata”.
ROOT-Sim Core
This repository keeps the sources of the ROOT-Sim core: this is the lowest-level library that implements the most significant part of the simulation algorithms used in the simulation framework.
The core can be built and used as a stand-alone low-level library writing C code, or it can be used within other projects, such as cROOT-Sim, i.e. the C/C++ packaging of the simulation library.
Dependencies and platforms
The core successfully compiles on x86 and ARM architectures, using either GCC or Clang compilers, on Linux, Windows,
and macOS.
A compiler supporting the C11 standard is required, such as GCC 8 or later. MSVC on Windows does not correctly
implement the full C11 standard (e.g., stdatomic.h
is not provided) and cannot be therefore used to build the project.
Windows users are encouraged to use clang.
MPI is a mandatory dependency of the project, used to support simulations runs on distributed systems. The core is continuously tested against the following MPI implementations:
- OpenMPI
- MPICH
- Intel MPI
Any of the three is required to build the project. A full MPI3 implementation supporting multithreading is necessary.
Building
To build the project, run:
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc ..
make
You can specify a different compiler using the -DCMAKE_C_COMPILER=
flag.
To run the test suite (which includes a correctness test), run in the build
folder:
ctest
Compiling and running a model
The ROOT-Sim core is not expected to be used directly to run models (see, for example,
cROOT-Sim). Nevertheless, an implementation of “low-level” models
can be located in test\integration
.
The tests can be compiled using the standard mpicc
compiler, linking against librscore
and launching
locally, or using mpiexec
to run on multiple nodes.
ROOT-Sim History
ROOT-Sim started as a research project to study distributed synchronization back in 1987.
Since then, the project has evolved significantly and it has allowed to experiment in many research directions. In the early days, the goal was to devise innovative synchronization schemes for distributed HPC environments, specifically to reduce the cost associated with the rollback operation. At the time, the name of the project was SimCore.
In the 90’s, a lot of research has been carried out to simplify the programming API, synthesizing a very-reduced API which allows to implement any simulation model in a mostly-sequential way, without the need to take into account all the idiosyncrasies related to speculative executions. The name ROOT-Sim appeared at this time.
In the 2000’s, the research has been focused on the optimization of the checkpointing schemes, introducing transparent support to use any kind of POSIX function to manage memory, demanding from the runtime environment the burden to keep everythign synchronized. In the last years, the focus has been towards programming transparency: new features have been added which allow to implement models which are portable across some kind of heterogeneous architectures, taking into account e.g. NUMA systems and clusters composed of different machines.
The last version, in the 2020’s, strives to architect a modern simulation framework. The core has been mostly rewritten from scratch, to simplify the implementation of the algorithms, and to reduce the amount of “optional” subsystems directly implemented into the core. At the same time, a modular SDK has been developed, allowing to build on top of the core multiple specialized runtime environments, possibly altering some algorithms in the core to suit the special needs of the domain.