Abstract
In this paper, we present a technique for repairing data race errors in parallel programs written in C/C++ and Fortran using the OpenMP API. Our technique can also remove barriers that are deemed unnecessary for correctness. We implement these ideas in our tool called LLOR, which takes a language-independent approach to provide appropriate placements of synchronization constructs to avoid data races. To the best of our knowledge, LLOR is the only tool that can repair parallel programs that use the OpenMP API. We showcase the capabilities of LLOR by performing extensive experiments on 415 parallel programs.
Nicola Grandi : Univers-ITA project PRIN 2017 PI.
The author names are in alphabetical order.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Amighi, A., Darabi, S., Blom, S., Huisman, M.: Specification and verification of atomic operations in GPGPU programs. In: SEFM 2015, pp. 69–83. Springer (2015)
Atzeni, S., Gopalakrishnan, G., Rakamaric, Z., Laguna, I., Lee, G.L., Ahn, D.H.: SWORD: a bounded memory-overhead detector of OpenMP data races in production runs. In: IPDPS 2018, pp. 845–854. IEEE Computer Society (2018)
Barnett, M., Chang, B.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: a modular reusable verifier for object-oriented programs. In: FMCO 2005, pp. 364–387. Springer (2005)
Basupalli, V., et al.: ompVerify: polyhedral analysis for the OpenMP programmer. In: Chapman, B.M., Gropp, W.D., Kumaran, K., Müller, M.S. (eds.) IWOMP 2011. LNCS, vol. 6665, pp. 37–53. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21487-5_4
Betts, A., et al.: The design and implementation of a verification technique for GPU kernels. TOPLAS 37(3), 10:1–10:49 (2015)
Betts, A., Chong, N., Donaldson, A.F., Qadeer, S., Thomson, P.: GPUVerify: a verifier for GPU kernels. In: OOPSLA 2012, pp. 113–132. ACM (2012)
Bjørner, N., Phan, A., Fleckenstein, L.: \(\nu \)Z - an optimizing SMT solver. In: TACAS 2015, pp. 194–199. Springer (2015)
Blackshear, S., Gorogiannis, N., O’Hearn, P.W., Sergey, I.: RacerD: compositional static race detection. Proc. ACM Program. Lang. 2(OOPSLA), 144:1–144:28 (2018)
Blom, S., Huisman, M., Mihelcic, M.: Specification and verification of GPGPU programs. Sci. Comput. Program. 95, 376–388 (2014)
Boehm, B.W., Papaccio, P.N.: Understanding and controlling software costs. IEEE Trans. Software Eng. 14(10), 1462–1477 (1988)
Bora, U., Das, S., Kukreja, P., Joshi, S., Upadrasta, R., Rajopadhye, S.V.: LLOV: a fast static data-race checker for OpenMP programs. ACM Trans. Archit. Code Optim. 17(4), 35:1–35:26 (2020)
Bora, U., Joshi, S., Muduganti, G., Upadrasta, R.: LLOR: automated repair of OpenMP programs (2024). https://arxiv.org/abs/2411.14590
Černý, P., Chatterjee, K., Henzinger, T.A., Radhakrishna, A., Singh, R.: Quantitative synthesis for concurrent programs. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 243–259. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_20
Chandra, S., Torlak, E., Barman, S., BodĂk, R.: Angelic debugging. In: ICSE 2011, pp. 121–130. ACM (2011)
Chatarasi, P., Shirako, J., Kong, M., Sarkar, V.: An extended polyhedral model for SPMD programs and its use in static data race detection. In: LCPC 2016, pp. 106–120. Springer (2016)
Chatarasi, P., Shirako, J., Sarkar, V.: Static data race detection for SPMD programs via an extended polyhedral representation. In: IMPACT 2016, vol. 16 (2016)
Che, S., Boyer, M., Meng, J., Tarjan, D., Sheaffer, J.W., Lee, S., Skadron, K.: Rodinia: a benchmark suite for heterogeneous computing. In: IISWC 2009, pp. 44–54. IEEE Computer Society (2009)
Dagum, L., Menon, R.: OpenMP: an industry-standard API for shared-memory programming. IEEE Comput. Sci. Eng. 5(1), 46–55 (1998)
Deshmukh, J., Ramalingam, G., Ranganath, V.-P., Vaswani, K.: Logical concurrency control from sequential proofs. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 226–245. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-11957-6_13
Dinning, A., Schonberg, E.: Detecting access anomalies in programs with critical sections. In: PADD 1991, pp. 85–96. ACM (1991)
Eichenberger, A.E., et al.: OMPT: an OpenMP tools application programming interface for performance analysis. In: Rendell, A.P., Chapman, B.M., Müller, M.S. (eds.) IWOMP 2013. LNCS, vol. 8122, pp. 171–185. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40698-0_13
Engler, D.R., Ashcraft, K.: RacerX: effective, static detection of race conditions and deadlocks. In: SOSP 2003, pp. 237–252. ACM (2003)
Fu, Z., Malik, S.: On solving the partial MAX-SAT problem. In: Biere, A., Gomes, C.P. (eds.) SAT 2006. LNCS, vol. 4121, pp. 252–265. Springer, Heidelberg (2006). https://doi.org/10.1007/11814948_25
Griesmayer, A., Bloem, R., Cook, B.: Repair of Boolean programs with an application to C. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 358–371. Springer, Heidelberg (2006). https://doi.org/10.1007/11817963_33
Jin, G., Song, L., Zhang, W., Lu, S., Liblit, B.: Automated atomicity-violation fixing. In: PLDI 2011, pp. 389–400. ACM (2011)
Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 226–238. Springer, Heidelberg (2005). https://doi.org/10.1007/11513988_23
Johnson, D.S.: Approximation algorithms for combinatorial problems. J. Comput. Syst. Sci. 9(3), 256–278 (1974)
Joshi, S., Kroening, D.: Property-driven fence insertion using reorder bounded model checking. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 291–307. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19249-9_19
Joshi, S., Lal, A.: Automatically finding atomic regions for fixing bugs in Concurrent programs. CoRR abs/1403.1749 (2014)
Joshi, S., Muduganti, G.: GPURepair: automated repair of GPU kernels. In: Henglein, F., Shoham, S., Vizel, Y. (eds.) VMCAI 2021. LNCS, vol. 12597, pp. 401–414. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67067-2_18
Joshi, S., Shyamasundar, R.K., Aggarwal, S.K.: A new method of MHP analysis for languages with dynamic barriers. In: IPDPS 2012, pp. 519–528. IEEE Computer Society (2012)
Kernels, P.R.: Parallel Research Kernels. https://github.com/ParRes/Kernels. Accessed 30 Sept 2024
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)
Lattner, C., Adve, V.S.: LLVM: a compilation framework for lifelong program analysis & transformation. In: CGO 2004, pp. 75–88. IEEE Computer Society (2004)
Li, G., Gopalakrishnan, G.: Scalable SMT-based verification of GPU kernel functions. In: FSE 2010, pp. 187–196. ACM (2010)
Li, G., Li, P., Sawaya, G., Gopalakrishnan, G., Ghosh, I., Rajan, S.P.: GKLEE: concolic verification and test generation for GPUs. In: PPOPP 2012, pp. 215–224. ACM (2012)
Liao, C., Lin, P., Asplund, J., Schordan, M., Karlin, I.: DataRaceBench: a benchmark suite for systematic evaluation of data race detection tools. In: SC 2017, p. 11. ACM (2017)
LLOR: LLOR Github Repository. https://github.com/cs17resch01003/llor. Accessed 30 Sept 2024
LLOR: LLOR VMCAI 2025 Artifacts. https://doi.org/10.5281/zenodo.13886253. Accessed 30 Sept 2024
Malik, M.Z., Siddiqui, J.H., Khurshid, S.: Constraint-based program debugging using data structure repair. In: ICST 2011, pp. 190–199. IEEE Computer Society (2011)
Mellor-Crummey, J.M.: On-the-fly detection of data races for programs with nested fork-join parallelism. In: SC 1991, pp. 24–33. ACM (1991)
Microsoft: Microsoft Azure Fsv2-Series Virtual Machine Sizes. https://docs.microsoft.com/en-us/azure/virtual-machines/fsv2-series. Accessed 30 Sept 2024
Monteiro, F.R., da S. Alves, E.H., da Silva, I., Ismail, H., Cordeiro, L.C., de Lima Filho, E.B.: ESBMC-GPU a context-bounded model checking tool to verify CUDA programs. Sci. Comput. Program. 152, 63–69 (2018)
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Muzahid, A., Otsuki, N., Torrellas, J.: AtomTracker: a comprehensive approach to atomic region inference and violation detection. In: MICRO 2010, pp. 287–297. IEEE Computer Society (2010)
Netzer, R.: Race condition detection for debugging shared-memory parallel programs. Ph.D. thesis, University of Wisconsin Madison (1991)
Perkovic, D., Keleher, P.J.: Online data-race detection via coherency guarantees. In: OSDI 1996, pp. 47–57. ACM (1996)
Pratikakis, P., Foster, J.S., Hicks, M.: LOCKSMITH: practical static race detection for C. TOPLAS 33(1), 3:1–3:55 (2011)
Project, E.C.: ECP Proxy Applications. https://proxyapps.exascaleproject.org/. Accessed 30 Sept 2024
Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.E.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997)
Valgrind-project: Helgrind: a thread error detector. http://valgrind.org/docs/manual/hg-manual.html. Accessed 30 Sept 2024
Vechev, M.T., Yahav, E., Yorsh, G.: Abstraction-guided synthesis of synchronization. In: POPL 2010, pp. 327–338. ACM (2010)
Voung, J.W., Jhala, R., Lerner, S.: RELAY: static race detection on millions of lines of code. In: FSE 2007, pp. 205–214. ACM (2007)
Ye, F., Schordan, M., Liao, C., Lin, P., Karlin, I., Sarkar, V.: Using polyhedral analysis to verify openmp applications are data race free. In: CORRECTNESS 2018, pp. 42–50. IEEE (2018)
Acknowledgements
We thank the Ministry of Education, India, for their financial support.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Bora, U., Joshi, S., Muduganti, G., Upadrasta, R. (2025). LLOR: Automated Repair of OpenMP Programs. In: Shankaranarayanan, K., Sankaranarayanan, S., Trivedi, A. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2025. Lecture Notes in Computer Science, vol 15530. Springer, Cham. https://doi.org/10.1007/978-3-031-82703-7_6
Download citation
DOI: https://doi.org/10.1007/978-3-031-82703-7_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-82702-0
Online ISBN: 978-3-031-82703-7
eBook Packages: Computer ScienceComputer Science (R0)