Predicting number of threads using balanced datasets for openMP regions

Jordi Alcaraz*, Ali TehraniJamsaz, Akash Dutta, Anna Sikora, Ali Jannesari, Joan Sorribes, Eduardo Cesar

*Corresponding author for this work

Research output: Contribution to journalArticleResearchpeer-review


Incorporating machine learning into automatic performance analysis and tuning tools is a promising path to tackle the increasing heterogeneity of current HPC applications. However, this introduces the need for generating balanced datasets of parallel applications’ executions and for dealing with natural imbalances for optimizing performance parameters. This work proposes a holistic approach that integrates a methodology for building balanced datasets of OpenMP code-region patterns and a way to use such datasets for tuning performance parameters. The methodology uses hardware performance counters to characterize the execution of a given region and correlation analysis to determine whether it covers an unique part of the pattern input space. Nevertheless, a balanced dataset of region patterns may become naturally imbalanced when used for training a model for tuning any specific performance parameter. For this reason, we have explored several methods for dealing with naturally imbalanced datasets for finding the appropriated way of using them for tuning purposes. Experimentation shows that the proposed methodology can be used to build balanced datasets and that such datasets, plus a combination of Random Forest and binary classification, can be used to train a model able to accurately tune the number of threads of OpenMP parallel regions.

Original languageEnglish
Publication statusPublished - 30 Apr 2022


  • Hardware performance counters
  • Machine learning
  • OpenMP
  • Parallel applications
  • Performance tuning


Dive into the research topics of 'Predicting number of threads using balanced datasets for openMP regions'. Together they form a unique fingerprint.

Cite this