[Openmp-dev] [EXTERNAL] Behavior of OMP_PROC_BIND=true

Lewis, Cannada via Openmp-dev openmp-dev at lists.llvm.org
Tue Jul 7 15:54:31 PDT 2020


I found where my confusion was coming from, but I would like clarification that omp_get_proc_bind is doing the right thing:

At line 5473 in kmp_settings.cpp

    } else if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_true) {
      // OMP_PROC_BIND=true maps to OMP_PROC_BIND=spread.
      __kmp_nested_proc_bind.bind_types[0] = proc_bind_spread;
    }

Even if libomp uses spread internally for the case of OMP_PROC_BIND=true shouldn’t omp_get_proc_bind still report that the value true was provided instead of the value for spread?

-Drew

On Jul 6, 2020, at 2:13 PM, Lewis, Cannada via Openmp-dev <openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>> wrote:

I am writing to figure out what is the expected result from get_omp_proc_bind when the environmental variable OMP_PROC_BIND is true.  Based on https://www.openmp.org/spec-html/5.0/openmpse52.html I was expecting the result to be 1, which is what I get when using g++ version 9.2, but for clang++ I get 4, which is the same as spread.  Any help would be appreciated since I am trying to match up results from an app compiled with clang and a performance model that currently returns 1 for get_omp_proc_bind when OMP_PROC_BIND=true.

-Drew
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org<mailto:Openmp-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200707/942d1252/attachment.html>


More information about the Openmp-dev mailing list