Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Can OMP_THREAD_LIMIT lead to process termination?

Alois_K_
Beginner
234 Views

According to  https://software.intel.com/en-us/node/522775 OMP_THREAD_LIMIT is not safe to use. Is this true or what is behind this cryptic sentence?

 

OMP_THREAD_LIMIT

... If this limit is reached and another native operating system thread encounters OpenMP* API calls or constructs, the program can abort with an error message...

0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
234 Views

This is the thread limit for the (your) process (program). The statement can be reworded as: If your process makes a system call, which in turn creates a thread on your behalf (and which thread becomes part of your process/program), and then if subsequently that (system) thread of yours makes an OpenMP API call that constructs additional OpenMP thread(s)... and... if the thread count of your application (plus your application's system threads OpenMP threads) will attempt to create more OpenMP threads than specified by OMP_THREAD_LIMIT, then this can cause the program to abort.

This should not affect anything else running on your system other than your application (assuming the system thread was written to handle such condition).

Jim Dempsey

0 Kudos
Reply