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

Updating Cuda Tests Makefile with -pthread #262

Merged

Conversation

Treece-Burgess
Copy link
Contributor

@Treece-Burgess Treece-Burgess commented Oct 15, 2024

Pull Request Description

In GLIBC version 2.34, libpthread as a separate library has been removed. Most components that used to be in a separate shared object have been placed into the main libc object, libc.so.6. Due to this, the -lpthread flag is not needed in GLIBC >= 2.34. See the following webpage for more discussion on this topic.

Even with versions of GLIBC >= 2.34 or GLIBC < 2.34, we still should place the -pthread flag when needed. -pthread encompasses -lpthread, but it also defines extra macros. From the man pages for gcc the following is stated for the -pthread flag: You should use this option consistently for both compilation and linking.

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@Treece-Burgess Treece-Burgess force-pushed the 10.15.24-cuda-tests-pthread branch 2 times, most recently from 87e0079 to ca1144f Compare October 16, 2024 22:22
@Treece-Burgess
Copy link
Contributor Author

@ametere-ssi I was able to finally recreate the pthread_create error when building PAPI with the Cuda component you first mentioned in PR #243. Please let me know if this PR resolves this bug.

…ncurrent_profiling to build correctly on glibc < 2.34.
@Treece-Burgess Treece-Burgess merged commit 9f6f6e6 into icl-utk-edu:master Nov 12, 2024
26 checks passed
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