This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgomp/58691] OpenMP 4: Surprising results with OMP_PLACES=


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58691

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> Looks reasonable, bind-var default value is indeed implementation defined and
> setting it to true by default if OMP_PLACES or GOMP_CPU_AFFINITY has been
> parsed into places list is reasonable.  So, how does this look like?

Looks good to me.

(Note that that will turn an explicit OMP_PROC_BIND=false into true, which
looks odd - even if I regard it as unlikely that someone wants to have no
proc-binding while setting OMP_PLACES or GOMP_CPU_AFFINITY:

OMP_PLACES='FALSE' OMP_PLACES='{0:4}' OMP_DISPLAY_ENV=verbose ./a.out 2>&1
|grep -E 'OMP_PLACES|OMP_PROC_'
  OMP_PROC_BIND = 'TRUE'
  OMP_PLACES = '{0:4}'

)


In addition, some patch like the following could be used. Side remark:
OMP_PLACES= is not yet documented in libgomp.texi.

--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -1272,3 +1272,4 @@ Specifies whether threads may be moved between
processors. If set to
 @code{TRUE}, OpenMP theads should not be moved, if set to @code{FALSE}
-they may be moved. If undefined, threads may move between processors.
+they may be moved. If undefined, threads may move between processors,
+unless @code{OMP_PLACES} or @code{GOMP_CPU_AFFINITY} is set.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]