Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thread sanitizer test in CI #4799

Open
wants to merge 46 commits into
base: development
Choose a base branch
from

Conversation

lucafedeli88
Copy link
Member

@lucafedeli88 lucafedeli88 commented Mar 22, 2024

This PR adds a thread sanitizer test in CI.

Specifically:

The thread sanitizer test uses libarcher, which should theoretically avoid false positives with OpenMP (see https://github.com/llvm/llvm-project/tree/main/openmp/tools/archer)

Some additional comments:

  • export PMIX_MCA_gds=hash I am not sure why this setting is required to be honest (I am still trying to understand). However, if I run without this setting I get an error message like: The gds/shmem component attempted to attach to a shared-memory segment at a particular base address, but was given a different one, followed by a suggestion to disable the gds/shmem component. It seems to be a relatively common issue.
  • export TSAN_OPTIONS='ignore_noninstrumented_modules=1' should avoid false positives with libraries not compiled with the thread sanitizer. Archer documentation suggests using this setting.
  • export ARCHER_OPTIONS="verbose=1" makes WarpX print the message:
    Archer detected OpenMP application with TSan, supplying OpenMP synchronization semantics, which confirms that libarcher is in use.
  • export OMPI_ALLOW_RUN_AS_ROOT=1 and export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 are needed because we are running the test in a docker container.

@lucafedeli88 lucafedeli88 added component: tests Tests and CI cleaning Clean code, improve readability labels Mar 22, 2024
@lucafedeli88 lucafedeli88 changed the title [WIP] Add thread sanitizer [WIP] Add thread sanitizer in CI Mar 22, 2024
@lucafedeli88 lucafedeli88 changed the title [WIP] Add thread sanitizer in CI [WIP] Add thread sanitizer test in CI Mar 22, 2024
@lucafedeli88 lucafedeli88 added bug Something isn't working bug: affects latest release Bug also exists in latest release version labels Apr 30, 2024
@lucafedeli88 lucafedeli88 changed the title [WIP] Add thread sanitizer test in CI Add thread sanitizer test in CI Apr 30, 2024
@ax3l
Copy link
Member

ax3l commented May 8, 2024

Uh, is there a race condition using OpenMP threads in ParticleBoundaryBuffer::gatherParticlesFromDomainBoundaries?

@RemiLehe
Copy link
Member

RemiLehe commented May 8, 2024

This could be related to:
#4593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working cleaning Clean code, improve readability component: tests Tests and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants