Skip to content

ROBUSTNESS: Automatically disable multi-threading in forked processing ("multicore") #355

Closed

Description

@HenrikBengtsson

Forked parallel processing and multi-threading are not the best friends, e.g. futureverse/future.apply#29 (comment). I think it might be worth having future disable multi-threading in such cases by default.

One solution would be do depend on RhpcBLASctl and use:

RhpcBLASctl::blas_set_num_threads(1L)
RhpcBLASctl::omp_set_num_threads(1L)

See also

Activity

  1. added this to the Next release milestone on Dec 31, 2019
  2. EmilRehnberg commented on Jan 8, 2020

    @EmilRehnberg

    Thanks for all the digging @HenrikBengtsson I wouldn't have been able to diagnose this myself well enough.

    I think the solution makes sense AFAIU it anyways. Still having 7 threads running while forking (as you mentioned in #348 ) doesn't seem helpful.

  3. HenrikBengtsson commented on Jan 15, 2020

    @HenrikBengtsson
    CollaboratorAuthor

    Next release will have an optional prototype/beta feature for temporarily disabling multi-threading in futures using OpenMP. I'm holding back on ditto BLAS for the reason that I don't know how to get the current number of BLAS threads, i.e. I don't know what the corresponding "getter" for RhpcBLASctl::blas_set_num_threads(1L) is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions