Number of threads

Number of threads

Hi,

I have a question about the parameter that specifies the "maximum number of worker threads to use". Is that a strict requirement (i.e. will it be somehow verfied during the evaluation), or are we allowed to use fewer or more threads if we find out that our program performs better that way?
And a related question: In the benchmark report, is a "12-cores HT machine" a machine with 6 or with 12 physical cores?

10 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.

I think that there is no problem in using a fewer number of threads, but for using a larger number of threads you should check with one of intel people.

You're allowed to use fewer threads, but you may be disqualified if you use more.

A 12-cores HT machines is a machine with 12 physical cores, and hyperthreading.

So do we have to make sure not to use more threads than the first argument of run? I thought we should just try to get the maximum of the given machine...
So basiclly if we are using openmp we have to add num_threads(atol(argv[1])) for our parallel regions. And otherwise we will be disqualified for using more threads than we may?

Quoting dieter84
So basiclly if we are using openmp we have to add num_threads(atol(argv[1])) for our parallel regions.

omp_set_num_threads() from omp.h works too. Just be careful if you use nested parallelism, you can easily end up with more threads than you meant to.

Quoting Xavier Hallade (Intel)
You're allowed to use fewer threads, but you may be disqualified if you use more.

A 12-cores HT machines is a machine with 12 physical cores, and hyperthreading.

I have found that VTune amplifier on some occassions (statically linking the OpenMP library) reports an additional thread named __kmp_launch_monitor.
This thread does no work and just ticks syncronization.

Am I right in assuming that this thread spawned from the implementation doesn't affect my count?

Also... for Intel TBB, istask_scheduler_init init(num_threads) the correct way of setting num_threads? Bacause I think that it creates a master thread and num_threads workers, thus ending up with 1 more.

That kind of thread is ok, don't worry.

Hi Xavier! What do you mean with "that kind of thread"? We could use some threads that do just coordination tasks and do not really work on comparisons or similar stuff. Are these threads OK as well? I am sorry for being picky, but we need to redesign things accordingly. Well, and disqualification is not an option ;-)

The way I understand it, your threads can do whatever you want if their total number is lower than the specified maximum.

Laisser un commentaire

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