Nowadays multicore architecture is everywhere. Who doesn’t have a cellphone or a laptop with more than one processor? This architecture offers new opportunities for the applications using it, because it doesn’t only provides more computing resources but also the capability of managing shared memory in order to enhance the performance.
Nowadays multicore architecture is everywhere. Who doesn’t have a cellphone or a laptop with more than one processor? This architecture offers new opportunities for the applications using it, because it doesn’t only provides more computing resources but also the capability of managing shared memory in order to enhance the performance.
Simulation is a tool that contributes in the decisional process, allowing start from a real case, building a model, a graphical or mathematical representation of the case studied, with the purpose of replicate it in a controlled environment and experiment that can help in the decisional process. One of the paradigms of simulation that allows to take profit from parallel architecture capabilities is the Parallel Discrete Event Simulation (PDES), which makes you able to record simulated entities movements since they get into the system until they leave it. A way to parallelize the simulation is to split the space into different parts or logical processes (LP) and distribute these parts along the processors. In social simulation area, in addition, it has been proven that Agent Based Modeling (ABM) is very useful, because it allows to treat different simulation units as agents (individuals, families) which can interact between them and with their environment, and they can take decisions affecting the system. These two paradigms allow us to have an approximation of the reality we want to simulate.
What have we done in inLab?
In inLab, in collaboration with the BSC (Barcelona Supercomputing Center) and the Lancaster University, Yades simulator was developed, which allows simulations of social demographic dynamical ABM taking profit of calculation capabilities provided by parallel architecture environment. In order to communicate different processors of a cluster or of a supercomputer, Yades uses the standard communication between nodes MPI (Message Passing Interface). It has been proven that MPI can manage communications between different computation nodes properly but has some weaknesses managing communications inside a unique node that uses a shared memory scheme.
For this reason, inLab has launched a project with the purpose of give Yades the capabilities that allow it to take profit of current architecture memory schema. In this project, it was started a collaboration with Sapienza University, in Rome, and their parallel simulation library ROOT-SIM, which allows to take profit of shared memory scheme in order to communicate processors inside a node, using threads and using a PDES paradigm.
Currently we have developed a version of Yades that uses ROOT-Sim, and we have achieved not only an optimization in the intra-node communications, but also other enhancements in some functionalities that give an extra value to the project. One of the most meaningful is the capability of using Yades simulator in sequential environments, with no parallel architecture. This possibility allows us to get closer to our end customer, which many times will not have any parallel architecture to work with.
Other enrichments achieved are the decrease in the execution time of our application in relation to the initial version of the application, and the possibility to use high agent mobility situations, like migrations of large quantity of population to neighbor regions, cases really useful if situations of war or natural disasters are being simulated.
In the graph below can be seen a comparison of the sequential execution time between our application in relation with the initial application.
This project has been useful to allow us to do our first steps to establish a line of investigation with the collaboration between two research groups of two European universities, and it is expected to continue in the coming months with the aim of improve the tool we have developed and provide it with more functionalities.