[Openmp-commits] [openmp] r319960 - Eliminate double printing of verbose affinity settings

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 6 13:07:41 PST 2017


Author: jlpeyton
Date: Wed Dec  6 13:07:41 2017
New Revision: 319960

URL: http://llvm.org/viewvc/llvm-project?rev=319960&view=rev
Log:
Eliminate double printing of verbose affinity settings

Redundant extra verbose output of binding to full mask in case
affinity=balanced or OMP_PLACES=<any> or OMP_PROC_BIND=<any>

Differential Revision: https://reviews.llvm.org/D40624

Modified:
    openmp/trunk/runtime/src/kmp_affinity.cpp

Modified: openmp/trunk/runtime/src/kmp_affinity.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_affinity.cpp?rev=319960&r1=319959&r2=319960&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp (original)
+++ openmp/trunk/runtime/src/kmp_affinity.cpp Wed Dec  6 13:07:41 2017
@@ -4640,7 +4640,9 @@ void __kmp_affinity_set_init_mask(int gt
 
   KMP_CPU_COPY(th->th.th_affin_mask, mask);
 
-  if (__kmp_affinity_verbose) {
+  if (__kmp_affinity_verbose
+      /* to avoid duplicate printing (will be correctly printed on barrier) */
+      && (__kmp_affinity_type == affinity_none || i != KMP_PLACE_ALL)) {
     char buf[KMP_AFFIN_MASK_PRINT_LEN];
     __kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
                               th->th.th_affin_mask);




More information about the Openmp-commits mailing list