Action #1834

Add information of how to set number of cores with OpenMP to user documentation

Added by Mayer Michael over 4 years ago. Updated over 2 years ago.

Status:ClosedStart date:08/02/2016
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

I have received a question by Nukri Komin about OpenMP and I don’t know the answer which is why I post it here:

Is there a way to set the maximum number of cores to be used by OpenMP? E.g. is it possible to set this during the configure step?


Recurrence

No recurrence.

History

#1 Updated by Mayer Michael over 4 years ago

  • Description updated (diff)

#2 Updated by Knödlseder Jürgen over 4 years ago

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 50

It is not possible to fix this number at compile time.

The number of threads for OpenMP is actually set by an environment variable, so it’s sufficient to set this variable before starting the code:

export OMP_NUM_THREADS=<number of threads to use>

This information should be added to the user documentation.

#3 Updated by Komin Nukri over 4 years ago

Hi Jürgen,

That’s exactly what I need. I want to set the number of threads for each job individually. Thanks a lot.

Cheers,

Nukri

#4 Updated by Knödlseder Jürgen over 4 years ago

  • Tracker changed from Support to Action
  • Subject changed from Limit OpenMP cores during configure step? to Add information of how to set number of cores with OpenMP to user documentation

Changed title and type of tracker to not forget about adding this to the documentation.

#5 Updated by Knödlseder Jürgen over 2 years ago

  • Project changed from GammaLib to ctools
  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

All ctools using OpenMP now have an nthreads parameter, so this issue has become obsolete.

Also available in: Atom PDF