use hwloc to choose ideal number of threads

Issue #1446 open
Roland Haas created an issue

Currently if OMP_NUM_THREADS is not set Cactus ends up using the "default" number of threads, which usually is as many as there are cores. This is however not always ideal, eg if one uses 2 MPI processes per machine or when using SMT or when running on a magny cours CPU which has 1/2 of a FPU unit per SMT unit.

Instead it might be useful to have the driver consult with hwloc to choose a more ideal number of threads.

Keyword:

Comments (3)

  1. Roland Haas reporter
    • removed comment

    One comment on the proposal: how would one handle MPI processes? Those are created before Cactus' main process (or at least creation is not under Cactus' control). So given that usually we want number_of_processes * number_of_threads_per_process = number_of_cores (or 2number_of_cores or 0.5number_of_cores) it seems that we really cannot choose the number of threads once the executable starts but have to rely on simfactory instead.

  2. Roland Haas reporter
    • changed status to resolved
    • removed comment

    I believe this cannot be handled from within Cactus since at this point all MPI processes are already started.

  3. Erik Schnetter
    • changed status to open
    • removed comment

    Reopening because this issue is about choosing the number of threads, not processes.

  4. Log in to comment