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

Scaling Cores, deciding the core usage

I am a naive user of TBB with my intel centrino duo machine.
I am currently doing a project of parallelizing Sudoku solving.
I have accomplished the program with my 2 cores.
I have the following questions on benchmarking its performance:
1)Can we decide the number of cores that TBB can operate on? This is to see the speed up happening between using 1 core and 2 cores. By default it is using both the cores.
2)I have only 2 cores. But i would also like to see or estimate how much will be the time taken when operated on more cores. Is there any emulators for multicore or any formula by which i can estimate the time taken when more cores are added? Or how else can i do the same?
3)Can i calculate the runtime memory usage by my algorithm using TBB?
btw, i am using ubuntu for execution.
Thanks a lot.
0 Kudos
1 Reply
Valued Contributor I
1. Yes, you can pass desired number of worker threads to constructor of tbb::task_scheduler_init.

2. Well, there is Intel Parallel Advisor which can kind of predict scalability for higher number of cores. However I suggest to run the program on a real machine, that will give more precise results.
You may use Intel Parallel Universe service to test your program on a machine with 16 hardware threads:

3. On linux you can use top for that.