Abstract

With the decline of Moore’s law and the ever increasing availability of cheap massively parallel hardware, it becomes more and more important to embrace parallel programming methods to implement Agent-Based Simulations (ABS). This has been acknowledged in the field a while ago and numerous research on distributed parallel ABS exists, focusing primarily on Parallel Discrete Event Simulation as the underlying mechanism. However, these concepts and tools are inherently difficult to master and apply and often an excess in case implementers simply want to parallelise their own, custom agent-based model implementation. However, with the established programming languages in the field, Python, Java and C++, it is not easy to address the complexities of parallel programming due to unrestricted side effects and the intricacies of low-level locking semantics. Therefore, in this paper we propose the use of a lock-free approach to parallel ABS using Software Transactional Memory (STM) in conjunction with the pure functional programming language Haskell, which in combination, removes some of the problems and complexities of parallel implementations in imperative approaches. We present two case studies, in which we compare the performance of lock-based and lock-free STM implementations in two different well known Agent-Based Models, where we investigate both the scaling performance under increasing number of CPU cores and the scaling performance under increasing number of agents. We show that the lock-free STM implementations consistently outperform the lock-based ones and scale much better to increasing number of CPU cores both on local hardware and on Amazon EC. Further, by utilizing the pure functional language Haskell we gain the benefits of immutable data and lack of unrestricted side effects guaranteed at compile-time, making validation easier and leading to increased confidence in the correctness of an implementation, something of fundamental importance and benefit in parallel programming in general and scientific computing like ABS in particular.

Highlights

  • The future of scientific computing in general and Agent-Based Simulation (ABS) in particular is parallelism: Moore’s law is declining as we are reaching the physical limits of CPU clocks

  • Various distributed simulation environments for ABS have been developed and their internals published in research papers: the SPADES system (Riley et al 2003) manages agents through UNIX pipes using a parallel sense-think-act cycle employing a conservative Parallel Discrete-Event Simulation (PDES) approach; Mace3J (Gasser and Kakugawa 2002) a Java based system running on single- or multicore workstations implements a message passing approach to parallelism; James II (Himmelspach and Uhrmacher 2007) is a Java based system and focuses on PDEVS simulation with a plugin architecture to facilitate reuse of models; the well known RePast-HPC (Minson and Theodoropoulos 2008; Gorur et al 2016) framework is using a PDES engine under the hood

  • This paper proposes Software Transactional Memory (STM) in conjunction with the functional programming language Haskell (Hudak et al 2007) as a new underlying concept for local parallelisation of ABS

Read more

Summary

Introduction

The future of scientific computing in general and Agent-Based Simulation (ABS) in particular is parallelism: Moore’s law is declining as we are reaching the physical limits of CPU clocks. Various distributed simulation environments for ABS have been developed and their internals published in research papers: the SPADES system (Riley et al 2003) manages agents through UNIX pipes using a parallel sense-think-act cycle employing a conservative PDES approach; Mace3J (Gasser and Kakugawa 2002) a Java based system running on single- or multicore workstations implements a message passing approach to parallelism; James II (Himmelspach and Uhrmacher 2007) is a Java based system and focuses on PDEVS simulation with a plugin architecture to facilitate reuse of models; the well known RePast-HPC (Minson and Theodoropoulos 2008; Gorur et al 2016) framework is using a PDES engine under the hood The baseline of this body of research is that parallelisation is possible and we know how to do it. We conclude in “Conclusion” section and give further research directions in “Future research” section

Background
Findings
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call