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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:994ea892bd02dd8a1c04875ad3553c57939c3abf

commit r13-2617-g994ea892bd02dd8a1c04875ad3553c57939c3abf
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Mon Sep 12 10:48:19 2022 +0200

    libgomp: Fix up icv-6.c [PR106894]

    The thing is,
    make check
    or
    make check RUNTESTFLAGS="c.exp='icv-6.c' c++.exp='icv-6.c'"
    in libgomp obj dir work fine, but
    make -j32 -k check RUNTESTFLAGS="c.exp='icv-6.c' c++.exp='icv-6.c'"
    fails.
    The thing is that the testcase as written relies on OMP_NUM_THREADS not
being
    set in environment (as it takes priority over OMP_NUM_THREADS_ALL for the
    host).
    So, if either a user has OMP_NUM_THREADS=42 in the environment by himself,
or
    when doing make check with -jN, we trigger:
              if test $$num_cpus -gt 8 && test -z "$$OMP_NUM_THREADS"; then \
                OMP_NUM_THREADS=8; export OMP_NUM_THREADS; \
                echo @@@ libgomp OMP_NUM_THREADS adjusted to 8 because of
parallel
    make check and too many CPUs; \
              fi; \
    in libgomp/testsuite/Makefile.am and so the test fails.

    2022-09-12  Jakub Jelinek  <ja...@redhat.com>

            PR libgomp/106894
            * testsuite/libgomp.c-c++-common/icv-6.c: Include string.h.
            (main): Avoid tests for which corresponding non-_ALL suffixed
variable
            is in the environment, or for OMP_NUM_TEAMS on the device
            OMP_NUM_TEAMS_DEV_?.

Reply via email to