Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Reduce test input sizes for debug builds with OpenMP in transform_binary.pass #1921

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

mmichel11
Copy link
Contributor

@mmichel11 mmichel11 commented Oct 24, 2024

transform_binary.pass with the OpenMP backend in debug builds has been timing out. This is caused by testing of forward and bidirectional iterators. When no compiler optimization is present, a large number of re-computation of iterators occurs in this line:

auto __iter = std::next(__first, __index);
which has an expensive cost for iterators without random access. In release builds, there is no problem due to compiler optimization.

The test is updated to reduce test sizes in this timeout case. I have also updated our CMakeLists.txt to set the PSTL_USE_DEBUG macro for OpenMP builds as well.

Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me leave a couple of unsignificant comments. Overall, the PR looks good to me.

CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmichel11 mmichel11 merged commit c376768 into main Nov 1, 2024
22 checks passed
@mmichel11 mmichel11 deleted the dev/mmichel11/fix_omp_timeout_transform_binary branch November 1, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants