Abstract
The performance of agent-based simulations has been shown to benefit immensely from execution on hardware accelerator devices such as graphics processing units (GPUs). Given the increasingly heterogeneous hardware platforms available to researchers, it is important to enable modellers to target multiple devices using a single model specification, and to avoid the need for in-depth knowledge of the hardware. Further, key modelling steps such as the definition of the simulation space and the specification of rules to resolve conflicts among agents should be supported in a simple and generic manner, while generating efficient code. To achieve these goals, we extend the OpenABL modelling language and code generation framework by three aspects: firstly, a new OpenCL backend enables the co-execution of arbitrary agent-based models on heterogeneous hardware. Secondly, the OpenABL language is extended to support graph-based simulation spaces. Thirdly, we specify a generic interface for specifying conflict resolution rules. In a performance comparison to the existing OpenABL backends, we show that depending on the simulation model, the opportunity for CPU-GPU co-execution enables a speedup of up to 2.0 over purely GPU-based simulation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ahmed, K.I.: Modeling drivers’ acceleration and lane changing behavior. Ph.D. thesis, Massachusetts Institute of Technology (1999)
Belviranli, M.E., Bhuyan, L.N., Gupta, R.: A dynamic self-scheduling scheme for heterogeneous multiprocessor architectures. ACM Trans. Archit. Code Optim. 9(4), 57 (2013)
Chisholm, R., Richmond, P., Maddock, S.: A standardised benchmark for assessing the performance of fixed radius near neighbours. In: Desprez, F., et al. (eds.) Euro-Par 2016. LNCS, vol. 10104, pp. 311–321. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-58943-5_25
Collier, N., North, M.: Repast HPC: a platform for large-scale agent-based modeling (2011)
Cordasco, G., De Chiara, R., Mancuso, A., Mazzeo, D., Scarano, V., Spagnuolo, C.: A framework for distributing agent-based simulations. In: Alexander, M., et al. (eds.) Euro-Par 2011. LNCS, vol. 7155, pp. 460–470. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-29737-3_51
Cosenza, B., et al.: OpenABL: a domain-specific language for parallel and distributed agent-based simulations. In: Aldinucci, M., Padovani, L., Torquati, M. (eds.) Euro-Par 2018. LNCS, vol. 11014, pp. 505–518. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-96983-1_36
Epstein, J.M., Axtell, R.: Growing Artificial Societies: Social Science from the Bottom Up. Brookings Institution Press, Washington, D.C. (1996)
Gardner, M.: Mathematical games: the fantastic combinations of John Conway’s new solitaire game “life”. Sci. Am. 223(4), 120–123 (1970)
Grewe, D., Wang, Z., O’Boyle, M.F.: Portable mapping of data parallel programs to OpenCL for heterogeneous systems. In: Proceedings of the International Symposium on Code Generation and Optimization, pp. 1–10. IEEE (2013)
Helbing, D., Molnar, P.: Social force model for pedestrian dynamics. Phys. Rev. E 51(5), 4282 (1995)
Kiran, M., Richmond, P., Holcombe, M., Chin, L.S., Worth, D., Greenough, C.: FLAME: simulating large populations of agents on parallel hardware architectures. In: Proceedings of the International Conference on Autonomous Agents and Multiagent Systems, pp. 1633–1636. IFAAMAS (2010)
Laville, G., Mazouzi, K., Lang, C., Marilleau, N., Herrmann, B., Philippe, L.: MCMAS: a toolkit to benefit from many-core architecure in agent-based simulation. In: an Mey, D., et al. (eds.) Euro-Par 2013. LNCS, vol. 8374, pp. 544–554. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54420-0_53
Li, P., Brunet, E., Trahay, F., Parrot, C., Thomas, G., Namyst, R.: Automatic OpenCL code generation for multi-device heterogeneous architectures. In: Proceedings of the International Conference on Parallel Processing, pp. 959–968. IEEE (2015)
Li, X., Cai, W., Turner, S.J.: Efficient neighbor searching for agent-based simulation on GPU. In: Proceedings of the International Symposium on Distributed Simulation and Real Time Applications, pp. 87–96. IEEE (2014)
Luke, S., Cioffi-Revilla, C., Panait, L., Sullivan, K., Balan, G.: MASON: a multiagent simulation environment. Simulation 81(7), 517–527 (2005)
Lysenko, M., D’Souza, R.M., et al.: A framework for megascale agent based model simulations on graphics processing units. J. Artif. Soc. Soc. Simul. 11(4), 10 (2008)
Macal, C.M., North, M.J.: Tutorial on agent-based modelling and simulation. In: Proceedings of the Winter Simulation Conference, pp. 2–15. IEEE (2005)
Minar, N., Burkhart, R., Langton, C., Askenazi, M., et al.: The swarm simulation system: a toolkit for building multi-agent simulations. Technical report (1996)
North, M.J., Collier, N.T., Vos, J.R.: Experiences creating three implementations of the repast agent modeling toolkit. ACM Trans. Model. Comput. Simul. 16(1), 1–25 (2006)
Pelechano, N., Badler, N.I.: Modeling crowd and trained leader behavior during building evacuation. IEEE Comput. Graphics Appl. 26(6), 80–86 (2006)
Reynolds, C.W.: Flocks, herds, and schools: a distributed behavioral model. In: Proceedings of the ACM SIGGRAPH, pp. 25–34. ACM (1987)
Richmond, P.: Resolving conflicts between multiple competing agents in parallel simulations. In: Lopes, L., et al. (eds.) Euro-Par 2014. LNCS, vol. 8805, pp. 383–394. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-14325-5_33
Richmond, P., Walker, D., Coakley, S., Romano, D.: High performance cellular level agent-based simulation with FLAME for the GPU. Briefings Bioinf. 11(3), 334–347 (2010)
Steuwer, M., Fensch, C., Lindley, S., Dubach, C.: Generating performance portable code using rewrite rules: from high-level functional expressions to high-performance OpenCL code. ACM SIGPLAN Not. 50(9), 205–217 (2015)
Steuwer, M., Remmelg, T., Dubach, C.: LIFT: A functional data-parallel IR for high-performance GPU Code generation. In: Proceedings of the International Symposium on Code Generation and Optimization, pp. 74–85. IEEE (2017)
Sujeeth, A.K., et al.: Delite: a compiler architecture for performance-oriented embedded domain-specific languages. ACM Trans. Embedded Comput. Syst. 13(4s), 134 (2014)
Xiao, J., Andelfinger, P., Eckhoff, D., Cai, W., Knoll, A.: Exploring execution schemes for agent-based traffic simulation on heterogeneous hardware. In: Proceedings of the International Symposium on Distributed Simulation and Real Time Applications, pp. 1–10. IEEE (2018)
Xiao, J., Andelfinger, P., Eckhoff, D., Cai, W., Knoll, A.: A survey on agent-based simulation using hardware accelerators. ACM Comput. Surv. 51(6), 131:1–131:35 (2019)
Yang, M., Andelfinger, P., Cai, W., Knoll, A.: Evaluation of conflict resolution methods for agent-based simulations on the GPU. In: Proceedings of the Conference on Principles of Advanced Discrete Simulation, pp. 129–132. ACM (2018)
Acknowledgement
This work was financially supported by the Singapore National Research Foundation under its Campus for Research Excellence And Technological Enterprise (CREATE) programme.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Xiao, J., Andelfinger, P., Cai, W., Richmond, P., Knoll, A., Eckhoff, D. (2020). Advancing Automatic Code Generation for Agent-Based Simulations on Heterogeneous Hardware. In: Schwardmann, U., et al. Euro-Par 2019: Parallel Processing Workshops. Euro-Par 2019. Lecture Notes in Computer Science(), vol 11997. Springer, Cham. https://doi.org/10.1007/978-3-030-48340-1_24
Download citation
DOI: https://doi.org/10.1007/978-3-030-48340-1_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-48339-5
Online ISBN: 978-3-030-48340-1
eBook Packages: Computer ScienceComputer Science (R0)