Skip to main content

Advancing Automatic Code Generation for Agent-Based Simulations on Heterogeneous Hardware

  • Conference paper
  • First Online:
Book cover Euro-Par 2019: Parallel Processing Workshops (Euro-Par 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11997))

Included in the following conference series:

  • 1251 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/xjjex1990/OpenABL_Extension.

  2. 2.

    https://github.com/OpenABL/OpenABL.

  3. 3.

    http://fpgasoftware.intel.com/opencl/.

References

  1. Ahmed, K.I.: Modeling drivers’ acceleration and lane changing behavior. Ph.D. thesis, Massachusetts Institute of Technology (1999)

    Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. 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

    Chapter  Google Scholar 

  4. Collier, N., North, M.: Repast HPC: a platform for large-scale agent-based modeling (2011)

    Google Scholar 

  5. 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

    Chapter  Google Scholar 

  6. 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

    Chapter  Google Scholar 

  7. Epstein, J.M., Axtell, R.: Growing Artificial Societies: Social Science from the Bottom Up. Brookings Institution Press, Washington, D.C. (1996)

    Book  Google Scholar 

  8. Gardner, M.: Mathematical games: the fantastic combinations of John Conway’s new solitaire game “life”. Sci. Am. 223(4), 120–123 (1970)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. Helbing, D., Molnar, P.: Social force model for pedestrian dynamics. Phys. Rev. E 51(5), 4282 (1995)

    Article  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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

    Chapter  Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Luke, S., Cioffi-Revilla, C., Panait, L., Sullivan, K., Balan, G.: MASON: a multiagent simulation environment. Simulation 81(7), 517–527 (2005)

    Article  Google Scholar 

  16. 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)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. Minar, N., Burkhart, R., Langton, C., Askenazi, M., et al.: The swarm simulation system: a toolkit for building multi-agent simulations. Technical report (1996)

    Google Scholar 

  19. 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)

    Article  Google Scholar 

  20. Pelechano, N., Badler, N.I.: Modeling crowd and trained leader behavior during building evacuation. IEEE Comput. Graphics Appl. 26(6), 80–86 (2006)

    Article  Google Scholar 

  21. Reynolds, C.W.: Flocks, herds, and schools: a distributed behavioral model. In: Proceedings of the ACM SIGGRAPH, pp. 25–34. ACM (1987)

    Google Scholar 

  22. 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

    Chapter  Google Scholar 

  23. 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)

    Article  Google Scholar 

  24. 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)

    Article  MathSciNet  Google Scholar 

  25. 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)

    Google Scholar 

  26. 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)

    Article  Google Scholar 

  27. 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)

    Google Scholar 

  28. 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)

    Article  Google Scholar 

  29. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Jiajian Xiao .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics