Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

thread stack size

vonmatt
Beginner
225 Views

Is it possible to specify the stack size for the TBB threads? From looking at the source code this does not seem to be possible.

It is my experience that different platforms have different default stack sizes for threads started by pthread_create(). For example, the convex hull test cases don't run on IBM AIX unless I explicitly increase the thread stack size. It seems to me that an optional stack size argument inthe task_scheduler_init class would solve this issue. If no stack size is specified, the defaults are taken. Otherwise the user supplied value is used.

0 Kudos
1 Reply
ARCH_R_Intel
Employee
225 Views
You are right. There's no easy way to set the stack size and this is something we should fix. As you suggest, an optional second argument on task_scheduler_init would be the way to go. Technically, we'll do this as a two-argument constructor without a default argument, and retain the old single-argument constructor. That way old .exe files will still run correctly with the new version of the library.
Reply