public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gilles.gouaillardet at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/104005] New: Regression on arm+sve with -O2 -fPIC
Date: Thu, 13 Jan 2022 11:41:59 +0000	[thread overview]
Message-ID: <bug-104005-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104005

            Bug ID: 104005
           Summary: Regression on arm+sve with -O2 -fPIC
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gilles.gouaillardet at gmail dot com
  Target Milestone: ---

The GROMACS (2021.3) non regression test suite now hangs with the latest trunk
when shared libraries are used from -O2 when two or more thread-MPI are used. I
only tried 512 bit SVE vectors.

I ran a git bisect and it pointed to the following commit:

commit 526e1639aa76b0a8496b0dc3a3ff2c450229544e (refs/bisect/bad)
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Nov 12 17:33:00 2021 +0000

    aarch64: Detect more consecutive MEMs


When investigating this issue, I found out that rebuilding the
src/gromacs/domdec/redistribute.cpp file **without** -fPIC is enough to avoid
the issue (a crash or a hang depending on the test cases).

FWIW, thread-MPI is a "fake" MPI implementation that used threads instead
processes. In this case, that means two threads. Then each thread enter its own
#pragma omp parallel section (and each thread-MPI thread has a unique OpenMP
thread)


The attached tarball includes preprocessed source (redistribute.cpp.i) and
assembly with -fPIC (redistribute.cpp.PIC.s) and without -fPIC
(redistribute.cpp.noPIC.s) for the commit mentioned above and the commit right
before.


Please let me know if this is enough for you to make sense of this bug,
otherwise I will provide instructions on how to build GROMACS from sources and
manually workaround the issue by "removing" the -fPIC flags for the
redistribute.cpp file.

             reply	other threads:[~2022-01-13 11:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 11:41 gilles.gouaillardet at gmail dot com [this message]
2022-01-14 19:17 ` [Bug target/104005] " rsandifo at gcc dot gnu.org
2022-01-17  9:02 ` [Bug target/104005] [12 Regression] " rguenth at gcc dot gnu.org
2022-01-17  9:07 ` [Bug target/104005] [12 Regression] Regression on aarch64+sve " pinskia at gcc dot gnu.org
2022-01-17  9:13 ` [Bug target/104005] [12 Regression] Regression on aarch64+sve with -O2 -fPIC since r12-5204 gilles.gouaillardet at gmail dot com
2022-01-17  9:14 ` pinskia at gcc dot gnu.org
2022-01-18 12:20 ` cvs-commit at gcc dot gnu.org
2022-01-18 12:22 ` rsandifo at gcc dot gnu.org
2022-01-19  8:25 ` gilles.gouaillardet at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104005-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).