[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51643] setting OMP_NUM_THREADS at runtime doe
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #51643] setting OMP_NUM_THREADS at runtime does not chaneg number of openmp threads |
Date: |
Wed, 2 Aug 2017 15:31:10 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #3, bug #51643 (project octave):
> I suspect that there was a misunderstanding at some point about how this
environment variable works. So instead of checking the value each time an
OMP-enabled function is called, it is only checked once to set some global
variable to specify the thread limit?
Yes. When a program starts, there's a set of environment variables that are
read. They are never read again. Instead, if a program wants to change them,
there's a set of functions to use:
http://pages.tacc.utexas.edu/~eijkhout/pcse/html/openmp.html#Runtimefunctionsandinternalcontrolvariables
> I hesitate to intercept and do special things for specific variables in
Octave's putenv function.
>
> Maybe we should document that the initial value of the number of threads may
be set from the environment and also offer a separate function to set the
thread limit for OMP?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51643>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/