Abstract
The reversible execution of C/C++ code has been a target of research and engineering for more than a decade as reversible computation has become a central notion in large-scale parallel discrete event simulation (PDES). The simulation models that are implemented for PDES are of increasing complexity and size and require various language features to support abstraction, encapsulation, and composition when building a simulation model. In this paper, we focus on parallel simulation models that are written with user-defined C++ abstractions and abstractions of the C++ Standard Library. We present an approach based on incremental state saving for establishing reversibility of C++ and an evaluation for a kinetic Monte-Carlo simulation implemented in C++. Although a significant runtime overhead is introduced with our technique, it is an enormous win that it allows using the entire C++ language, and has that code automatically transformed into reversible code to enable parallel execution with the Rensselaer’s optimistic simulation system (ROSS).
Similar content being viewed by others
References
Barnes, Jr., P.D., Carothers, C.D., Jefferson, D.R., LaPre, J.M.: Warp speed: executing time warp on 1,966,080 cores. In: Proceedings of the 2013 ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, SIGSIM-PADS ’13, pp. 327–336. ACM, New York (2013)
Carothers, C.D., Perumalla, K.S., Fujimoto, R.M.: Efficient optimistic parallel simulations using reverse computation. ACM Trans. Model. Comput. Simul. 9(3), 224–253 (1999)
Cingolani, D., Pellegrini, A., Quaglia, F.: Transparently mixing undo logs and software reversibility for state recovery in optimistic PDES. In: Proceedings of the 3rd ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, SIGSIM PADS ’15, pp. 211–222. ACM, New York (2015)
Cingolani, D., Pellegrini, A., Quaglia, F.: Transparently mixing undo logs and software reversibility for state recovery in optimistic PDES. ACM Trans. Model. Comput. Simul. 27(2):11:1–11:26 (2017)
Cingolani, D., Pellegrini, A., Schordan, M., Quaglia, F., Jefferson, D.R.: Dealing with reversibility of shared libraries in PDES. In: Proceedings of the 2017 ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, SIGSIM-PADS ’17, pp. 41–52. ACM, New York (2017)
Fujimoto, R.M.: Parallel and Distribution Simulation Systems, 1st edn. Wiley, New York (1999)
Holder, A.O., Carothers, C.D.: Analysis of time warp on a 32,768 processor IBM Blue Gene/L supercomputer. In: Proceedings of the European Modeling and Simulation Symposium (EMSS) (2008)
Hou, C., Vulov, G., Quinlan, D., Jefferson, D., Fujimoto, R., Vuduc, R.: A new method for program inversion. In: O’Boyle, M. (ed.) Compiler Construction, pp. 81–100. Springer, Berlin (2012)
Jefferson, D.R.: Virtual time. ACM Trans. Program. Lang. Syst. 7(3), 404–425 (1985)
LaPre, J.M., Gonsiorowski, E.J., Carothers, C.D.: LORAIN: a step closer to the PDES ’holy grail’. In: Proceedings of the 2Nd ACM SIGSIM/PADS Conference on Principles of Advanced Discrete Simulation, SIGSIM-PADS ’14, pp. 3–14. ACM, New York (2014)
Omelchenko, Y., Karimabadi, H.: Hypers: a unidimensional asynchronous framework for multiscale hybrid simulations. J. Comp. Phys. 231(4), 1766–1780 (2012)
Pellegrini, A.: Hijacker: efficient static software instrumentation with applications in high performance computing: Poster paper. In: High Performance Computing and Simulation (HPCS), 2013 International Conference on, pp. 650–655 (2013)
Pellegrini, A., Quaglia, F.: A fine-grain time-sharing time warp system. ACM Trans. Model. Comput. Simul. 27(2):10:1–10:25 (2017)
Pellegrini, A., Vitali, R., Quaglia, F.: Autonomic state management for optimistic simulation platforms. IEEE Trans. Parallel Distrib. Syst. 26(6), 1560–1569 (2015)
Perumalla, K.S.: Introduction to Reversible Computing. Computational Science. Chapman Hall/CRC Press, Boca Raton (2013). ISBN 9781439873403
Perumalla, K.S., Park, A.J.: Reverse computation for rollback-based fault tolerance in large parallel systems. Cluster Comput. 17(2), 303–313 (2014)
Quinlan, D., Liao, C., Matzke, R., Schordan, M., Panas, T., Vuduc, R., Yi. Q.: ROSE Web Page. http://www.rosecompiler.org (2014)
Rönngren, R., Liljenstam, M., Ayani, R., Montagnat, J.: Transparent incremental state saving in time warp parallel discrete event simulation. In: Proceedings of the Tenth Workshop on Parallel and Distributed Simulation, PADS ’96, pp. 70–77. IEEE Computer Society, Washington, DC (1996)
Santini, E., Ianni, M., Pellegrini, A., Quaglia, F.: Hardware-transactional-memory based speculative parallel discrete event simulation of very fine grain models. In: 2015 IEEE 22nd International Conference on High Performance Computing (HiPC), pp. 145–154 (2015)
Schordan, M., Jefferson, D., Barnes, P., Oppelstrup, T., Quinlan, D.: Reverse code generation for parallel discrete event simulation. In: Krivine, J., Stefani, J.-B. (eds.) Reversible Computation. Lecture Notes in Computer Science, vol. 9138, pp. 95–110. Springer International Publishing, New York (2015)
Schordan, M., Oppelstrup, T., Jefferson, D., Barnes, Jr., P.D., Quinlan, D.: Automatic generation of reversible C++ code and its performance in a scalable kinetic Monte-Carlo application. In: Proceedings of the 2016 ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, SIGSIM-PADS ’16, pp. 111–122. ACM, New York (2016)
Vulov, G., Hou, C., Vuduc, R., Fujimoto, R., Quinlan, D., Jefferson, D.: The Backstroke framework for source level reverse computation applied to parallel discrete event simulation. In: Proceedings of the Winter Simulation Conference, WSC ’11, pp. 2965–2979. Winter Simulation Conference (2011)
Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Proceedings of the 5th Conference on Computing Frontiers, CF ’08, pp. 43–54. ACM, New York (2008)
Yokoyama, T., Axelsen, H.B., Glück, R.: Reversible flowchart languages and the structured reversible program theorem. In: Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A., Walukiewicz, I. (eds.) Automata, Languages and Programming, pp. 258–270. Springer, Berlin (2008)
Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Proceedings of the 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, PEPM ’07, pp. 144–153. ACM, New York (2007)
Acknowledgements
We wish to thank the reviewers for their detailed comments and suggestions. This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. IM release number LLNL-JRNL-745586.
Author information
Authors and Affiliations
Corresponding author
About this article
Cite this article
Schordan, M., Oppelstrup, T., Jefferson, D. et al. Generation of Reversible C++ Code for Optimistic Parallel Discrete Event Simulation. New Gener. Comput. 36, 257–280 (2018). https://doi.org/10.1007/s00354-018-0038-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00354-018-0038-2