[Openmp-commits] [PATCH] D90473: [OpenMP][Tool] Add Archer option to disable data race analysis for sequential part

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 30 08:58:02 PDT 2020


protze.joachim created this revision.
protze.joachim added reviewers: Hahnfeld, jdoerfert.
protze.joachim added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
protze.joachim requested review of this revision.
Herald added a subscriber: sstefan1.

This introduces the new `ARCHER_OPTIONS` flag `ignore_serial=0|1` to disable analysis and logging of memory accesses in the sequential part of the OpenMP application.

In the sequential part of an OpenMP program no data race is possible, unless there is non-OpenMP concurrency (such as pthreads, MPI, ...). For the latter reason, this is not active by default.

Besides reducing the runtime overhead for the sequential part of the program, this reduces the memory overhead for sequential initialization. In combination with `flush_shadow=1` this can allow analysis of applications, which run close to the limit of available memory, but only access smaller parts of shared memory during each OpenMP parallel region.

The problem is that Archer only gets active, when the OpenMP runtime gets initialized, which might be after serial initialization of the application. In such case, it helps to call for example `omp_get_max_threads()` at the beginning of main.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90473

Files:
  openmp/tools/archer/README.md
  openmp/tools/archer/ompt-tsan.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90473.301889.patch
Type: text/x-patch
Size: 3756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201030/ed842982/attachment.bin>


More information about the Openmp-commits mailing list