Github messages for voidlinux
 help / color / mirror / Atom feed
From: Sturmflut <Sturmflut@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: darktable-3.0.x: build fails for aarch64* with openmp
Date: Sat, 27 Aug 2022 00:59:19 +0200	[thread overview]
Message-ID: <20220826225919.ZMZhZtH0kDEP3mt-WoQA_5w3RC8kdkZFFzibuBUpGy8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21105@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

New comment by Sturmflut on void-packages repository

https://github.com/void-linux/void-packages/issues/21105#issuecomment-1229026639

Comment:
Funnily I came across my own post in this issue one and a half years later when trying to build darktable on a Raspberry Pi.

It looks like this problem still exists with GCC 10.2.1 and the current darktable master (I just tried commit ab7e374330a9e50abad0f2784bda4b319e770239, a bunch of commits after the 4.0 release).

An example for code that raises this error is:

```
// Kahan summation algorithm
#ifdef _OPENMP
#pragma omp declare simd aligned(c)
#endif
static inline float Kahan_sum(const float m, float *const __restrict__ c, const float add)
{
   const float t1 = add - (*c);
   const float t2 = m + t1;
   *c = (t2 - m) - t1;
   return t2;
}
```

The two `const float` are 32 bit, the `float *const` should be 64 bit on AArch64. The limitation that all types must be of the same length for OpenMD SIMD only exists for AArch64 in GCC, and this is still the case in the latest GCC 12.2.0. So it's basically possible to use all parts of OpenMP except SIMD.

Theoretically this should be accomplished with CFLAGS="-fopenmp -fno-openmp-simd". But it isn't. There is also no GCC macro to check for OpenMP SIMD support or something like that (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80502), so apart from changing the code I don't see an other option than to completely disable OpenMP when building on AArch64.

  parent reply	other threads:[~2022-08-26 22:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  6:37 [ISSUE] " lemmi
2021-01-06 16:37 ` Sturmflut
2021-01-07  4:09 ` lemmi
2022-04-16  2:02 ` github-actions
2022-04-30  2:13 ` [ISSUE] [CLOSED] " github-actions
2022-08-26 22:59 ` Sturmflut [this message]
2022-08-27  5:43 ` lemmi
2022-08-27  5:43 ` lemmi
2022-08-27  6:11 ` darktable>=3.0.x: " lemmi
2022-08-27 11:57 ` Sturmflut
2022-08-27 13:24 ` lemmi
2022-08-27 14:03 ` Sturmflut
2022-08-31 21:29 ` lemmi
2022-11-30  2:03 ` github-actions
2022-12-15  2:01 ` [ISSUE] [CLOSED] " github-actions

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=20220826225919.ZMZhZtH0kDEP3mt-WoQA_5w3RC8kdkZFFzibuBUpGy8@z \
    --to=sturmflut@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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 NNTP newsgroup(s).