Abstract
Writing a parallel shared memory application that scales well on the future multi-core processors is a challenging task. The contention among shared resources increases as the number of threads increases. This may cause a false sharing problem, which can degrade the performance of an application. OpenMP Tools (OMPT) [2]- a performance tool APIs for OpenMP- enables performance tools to gather useful performance related information from OpenMP applications with lower overhead. In this paper, we propose a light-weight false sharing detection technique for OpenMP programming model using OMPT. We show that the OMPT framework has the ability to detect unique patterns that can be used to build a quality detection model for false sharing in OpenMP programs. In this work, we treat the false sharing detection problem as a binary classification problem. We develop a set of OpenMP programs in which false sharing can be turned on and off. We run these programs both with and without false sharing and collect a set of hardware performance event counts using OMPT. We use the collected data to train a binary classifier. We test the trained classifier using the NAS Parallel Benchmark applications. Our experiments show that the trained classifier can detect false sharing cases with an average accuracy of around 90 %.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Chow, J.-H., Sarkar, V.: False sharing elimination by selection of runtime scheduling parameters. In: Proceedings of the 1997 International Conference on Parallel Processing (1997)
Eichenberger, A., Mellor-Crummey, J., Schulz, M., Copty, N., DelSignore, J., Dietrich, R., et al.: OMPT and OMPD: OpenMP tools application programming interfaces for performance analysis and debugging. In: International Workshop on OpenMP (IWOMP 2013) (2013)
Gunther, S.M., Weidendorfer, J.: Assessing cache false sharing effects by dynamic binary instrumentation. In: Proceedings of the Workshop on Binary Instrumentation and Applications (WBIA 2009), New York (2009)
Intel Corporation.: Avoiding and Identifying False Sharing Among Threads (2010)
Intel Corporation.: Intel Performance Tuning Utility 4.0 User Guide (2011)
Itzkowitz, M., Mazurov, O., Copty, N., Lin, Y.: An OpenMP runtime API for profiling. Sun Microsystems, Inc., OpenMP ARB White Paper. http://www.compunity.org/futures/omp-api.html
Jayasena, S., Amarasinghe, S., Abeyweera, A., Amarasinghe, G., De Silva, H., Rathnayake, S., Meng, X., Liu, Y.: Detection of false sharing using machine learning. In: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis (SC 2013), New York (2013)
Jeremiassen, T.E., Eggers, S.J.: Reducing false sharing on shared memory multiprocessors through compile time data transformations. In: SIGPLAN (1995)
Liu, T., Berger, E.: SHERIFF: precise detection and automatic mitigation of false sharing. In: Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 3–18 (2011)
Liu, T., Berger, E.: Sheriff: Detecting and Eliminating False Sharing. Technical report, University of Massachusetts, Amherst, Massachusetts (2010)
Liu, T., Tian, C., Hu, Z., Berger, E: PREDATOR: predictive false sharing detection. In: Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, New York (2014)
Liu, X., Mellor-Crummey, J.: Pinpointing data locality problems using datacentric analysis. In: 2011 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO), pp. 171–180 (2011)
Marathe, J., Mueller, F., de Supinski, B.R.: Analysis of cache-coherence bottlenecks with hybrid hardware/software techniques. ACM Trans. Archit. Code Optim. (TACO) 3, 390–423 (2006). New York
Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: The WEKA data mining software: an update. SIGKDD Explor. 11(1), 10–18 (2009)
McCurdy, C., Vetter, J.: Memphis: finding and fixing numa-related performance problems on multi-core platforms. In: 2010 IEEE International Symposium on Performance Analysis of Systems Software (ISPASS), pp. 87–96 (2010)
Mohr, B., Malony, A.D., Hoppe, H.-C., Schlimbach, F., Haab, G., Hoeflinger, J., Shah, S.: A performance monitoring interface for OpenMP. In: Proceedings of the Fourth European Workshop on OpenMP, Rome, Italy (2002)
Nandamuri, A., Malik, A.M., Qawasmeh, A., Chapman, B.M.: Power and energy footprint of openMP programs using OpenMP runtime API. In: Proceedings of the 2nd International Workshop on Energy Efficient Supercomputing (E2SC 2014), pp. 79–88. IEEE Press, Piscataway (2014)
OpenMP Source Code Repository. http://www.pcg.ull.es/ompscr/
NAS Parallel Benchmark Applications. http://www.nas.nasa.gov/publications/npb.html#url
Torrellas, J., Lam, H.S., Hennessy, J.L.: False sharing and spatial locality in multiprocessor caches. IEEE Trans. Comput. 43, 651–663 (1994)
Weaver, V.: The Unofficial Linux Perf Events Web-Page (2013). http://web.eece.maine.edu/vweaver/projects/perf_events/
Wicaksono, B., Tolubaeva, M., Chapman, B.: Detecting false sharing in OpenMP applications using the DARWIN framework. In: Proceedings of International Workshop on Languages and Compilers for Parallel Computing (2011)
Zhao, Q., Koh, D., Raza, S., Bruening, D., Wong, W., Amarasinghe, S.: Dynamic cache contention detection in multi-threaded applications. In: Proceedings of the 7th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE 2011), pp. 27–38 (2011)
Acknowledgments
The authors would like to thank their colleagues in the HPCTools group at the University of Houston for their extensive collaboration to make this work a reality. We would also like to thank Nagendra Kaushik Katta for proofreading the final draft of the paper. This work is supported by the National Science Foundation under grant CCF-1148052.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Ghane, M., Malik, A.M., Chapman, B., Qawasmeh, A. (2015). False Sharing Detection in OpenMP Applications Using OMPT API. In: Terboven, C., de Supinski, B., Reble, P., Chapman, B., Müller, M. (eds) OpenMP: Heterogenous Execution and Data Movements. IWOMP 2015. Lecture Notes in Computer Science(), vol 9342. Springer, Cham. https://doi.org/10.1007/978-3-319-24595-9_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-24595-9_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-24594-2
Online ISBN: 978-3-319-24595-9
eBook Packages: Computer ScienceComputer Science (R0)