I want to close a thread in openMP after running a certain amount of time. How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OpenMP threads cannot be killed forcefully from the outside. They do not have a handle that you can use to perform operations like join, interrupt, abort, etc.
In fact, OpenMP is not even designed for this. It’s better to just let the runtime handle the threads and use explicit threads if you need to do something special.