controlling number of threads and their placement in CnC

controlling number of threads and their placement in CnC

Hi,I am running a simple program on a machine with 16 cpus where each with 8 cores. But the program only invokes 16 threads. I was hoping if there was anyway to control how many threads get invoke 64, 16 or 8. And if it is possible to decide their placement.Thanks.Sandeep

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hi Sandeep,

Thank you for using CnC.

You can control the number of threads used in your CnC program by calling CnC::debug::set_num_threads(int n). This call needs to be done before the context is created in order to be effective.

Alternatively, you can set the environment variable CNC_NUM_THREADS to the number of threads you want to use in your shell.

There is currently no way to specify the placement of the threads.

For more information on this topic, please refer to the Runtime API document available here:

http://software.intel.com/en-us/sites/whatif/runtime_api/index.html

and search for "set_num_threads" or "CNC_NUM_THREADS".

-Chih-Ping

Thanks Chih-Ping. That was prompt and helpful :)

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui