[Openmp-dev] Behavior of OMP_PROC_BIND=true

Jeff Hammond via Openmp-dev openmp-dev at lists.llvm.org
Mon Jul 6 14:54:56 PDT 2020


I can't find the spec text on the behavior of true but
https://docs.nersc.gov/jobs/affinity/ says "Thread affinity is enabled with
an implementation-defined default place list."

In any case, you can interpret the return value of omp_get_proc_bind using
the following (https://www.openmp.org/spec-html/5.0/openmpsu132.html):

typedef enum omp_proc_bind_t {
  omp_proc_bind_false = 0,
  omp_proc_bind_true = 1,
  omp_proc_bind_master = 2,
  omp_proc_bind_close = 3,
  omp_proc_bind_spread = 4
} omp_proc_bind_t;


On Mon, Jul 6, 2020 at 2:13 PM Lewis, Cannada via Openmp-dev <
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
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>


-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200706/745ca383/attachment.html>


More information about the Openmp-dev mailing list