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

tests fail when building bleadperl@v5.39.10-16-g8cacb84717 with intel oneapi C compiler #22209

Closed
tonycoz opened this issue May 13, 2024 · 0 comments · Fixed by #22226
Closed

Comments

@tonycoz
Copy link
Contributor

tonycoz commented May 13, 2024

Module:

Description

Several tests fail:

Test Summary Report
-------------------
op/inc.t                                                           (Wstat: 0 Tests: 93 Failed: 2)
  Failed tests:  92-93
op/infnan.t                                                        (Wstat: 65280 (exited 255) Tests: 340 Failed: 4)
  Failed tests:  331, 333-335
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
opbasic/cmp.t                                                      (Wstat: 0 Tests: 13280 Failed: 43)
  Failed tests:  49, 637, 1211, 1771, 1785, 1799, 1813, 1827
                1841, 1855, 1869, 1883, 1897, 1911, 1925
                1939, 1953, 1967, 1981, 1995, 2009, 2023
                2037, 2051, 2065, 2079, 2093, 2107, 2121
                2135, 2149, 2163, 2177, 2191, 2205, 2219
                2233, 2247, 2261, 2275, 2289, 2303, 2317
../cpan/Math-BigInt/t/bigrat.t                                     (Wstat: 256 (exited 1) Tests: 203 Failed: 1)
  Failed test:  171
  Non-zero exit status: 1
../cpan/Scalar-List-Utils/t/uniqnum.t                              (Wstat: 256 (exited 1) Tests: 23 Failed: 1)
  Failed test:  9
  Non-zero exit status: 1
../ext/POSIX/t/math.t                                              (Wstat: 1536 (exited 6) Tests: 152 Failed: 6)
  Failed tests:  73, 76, 79, 148-150
  Non-zero exit status: 6
../lib/builtin.t                                                   (Wstat: 0 Tests: 198 Failed: 2)
  Failed tests:  20-21
../lib/warnings.t                                                  (Wstat: 0 Tests: 952 Failed: 1)
  Failed test:  307
Files=2895, Tests=1198022, 488 wallclock secs (53.79 usr  5.60 sys + 554.65 cusr 41.01 csys = 655.05 CPU)
Result: FAIL
Test reports for the failed tests
$ ( cd t ; ./perl harness op/inc.t op/infnan.t opbasic/cmp.t ../cpan/Math-BigInt/t/bigrat.t ../cpan/Scalar-List-Utils/t/uniqnum.t ../ext/POSIX/t/math.t ../lib/builtin.t ../lib/warnings.t )
op/inc.t ............................... 1/? # Failed test 92 - incrementing NaN under use warnings 'imprecision' at op/inc.t line 441
#      got "Lost precision when incrementing NaN by 1 at (eval 56) line 4.\n"
# expected undef
# Failed test 93 - decrementing NaN under use warnings 'imprecision' at op/inc.t line 441
#      got "Lost precision when decrementing NaN by 1 at (eval 57) line 4.\n"
# expected undef
op/inc.t ............................... Failed 2/93 subtests 
op/infnan.t ............................ 1/? # Failed test 331 - NaN is NaN numerically (by not being NaN) at op/infnan.t line 279
#      got "0"
# expected != "0"
# 0 - 0 = 0
# Failed test 333 - 0 value stringifies as NaN at op/infnan.t line 282
#      got "0"
# expected "NaN"
# Failed test 334 - +NaN is NaN at op/infnan.t line 286
#      got "0"
# expected "NaN"
# Failed test 335 - -NaN is NaN at op/infnan.t line 287
#      got "0"
# expected "NaN"
Illegal division by zero at op/infnan.t line 302.
op/infnan.t ............................ Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/340 subtests 
opbasic/cmp.t .......................... 12976/13280 Wide character in print at opbasic/cmp.t line 70.
Wide character in print at opbasic/cmp.t line 70.
opbasic/cmp.t .......................... Failed 43/13280 subtests 
../cpan/Math-BigInt/t/bigrat.t ......... 1/203 
    #   Failed test '$x has the right value'
    #   at t/bigrat.t line 430.
    #          got: 0
    #     expected: anything else
    # Looks like you failed 1 test of 3.

#   Failed test 'Math::BigRat -> new("NaN") -> numify()'
#   at t/bigrat.t line 431.
# Looks like you failed 1 test of 203.
../cpan/Math-BigInt/t/bigrat.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/203 subtests 
../cpan/Scalar-List-Utils/t/uniqnum.t .. 1/23 
#   Failed test 'uniqnum preserves the special values of +-Inf and Nan'
#   at t/uniqnum.t line 198.
#     Structures begin differing at:
#          $got->[5] = Does not exist
#     $expected->[5] = '0'
# Looks like you failed 1 test of 23.
../cpan/Scalar-List-Utils/t/uniqnum.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/23 subtests 
../ext/POSIX/t/math.t .................. 1/? 
#   Failed test 'isfinite Inf'
#   at t/math.t line 111.

#   Failed test 'isfinite NaN'
#   at t/math.t line 117.

#   Failed test 'nan'
#   at t/math.t line 120.
#          got: 0
#     expected: anything else

#   Failed test 'NAN is Perl's NaN'
#   at t/math.t line 290.
#                   '0'
#     doesn't match '(?^:^NaN)'

#   Failed test 'NAN != NAN'
#   at t/math.t line 291.
#          got: 0
#     expected: anything else

#   Failed test 'NAN == NAN'
#   at t/math.t line 292.
# Looks like you failed 6 tests of 152.
../ext/POSIX/t/math.t .................. Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/152 subtests 
../lib/builtin.t ....................... 1/? # Failed test 20 - NaN is not equal to NaN at ../lib/builtin.t line 67
# Failed test 21 - NaN returned by real xsub at ../lib/builtin.t line 70
../lib/builtin.t ....................... Failed 2/198 subtests 
../lib/warnings.t ...................... 239/952 FILE: lib/warnings/9uninit ; line 1602
PROG: 
use warnings 'uninitialized';
my $nan = "NaN";
if ($nan == $nan) {
    print <<'EOM';
SKIPPED
# NaN not supported here.
EOM
    exit;
} 
my $v;
$v = 1 + ($nan <=> 1);
EXPECTED:
Use of uninitialized value in addition (+) at - line 11.
GOT:

# Failed test 307 - test from lib/warnings/9uninit at line 1602 at lib/warnings/9uninit line 1602
../lib/warnings.t ...................... 939/952 #
# Note: 'run_multiple_progs' run has one or more failures
#        you can consider setting the environment variable
#        PERL_TEST_ABORT_FIRST_FAILURE=1 before running the test
#        to stop on the first error.
#
../lib/warnings.t ...................... Failed 1/952 subtests 
        (less 1 skipped subtest: 950 okay)

Steps to Reproduce

Install the oneapi C compiler, per the instructions at https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-1/apt.html then:

$ ./Configure -des -Dusedevel -Dcc=/opt/intel/oneapi/compiler/2024.1/bin/icx -Dusethreads -DDEBUGGING && TEST_JOBS=3 make -j3 test_harness

I suspect this needs a hints update, since these seem to be mostly floating point issues.

I tried using -mp which the hints add for the icc classic intel compiler, but icx doesn't accept this switch.

Expected behavior

All tests pass.

Perl configuration

Summary of my perl5 (revision 5 version 39 subversion 11) configuration:
  Commit id: 8cacb84717058962131a5d2a3180c34d514f2b05
  Platform:
    osname=linux
    osvers=6.1.0-17-amd64
    archname=x86_64-linux-thread-multi
    uname='linux venus 6.1.0-17-amd64 #1 smp preempt_dynamic debian 6.1.69-1 (2023-12-30) x86_64 gnulinux '
    config_args='-des -Dusedevel -Dcc=/opt/intel/oneapi/compiler/2024.1/bin/icx -Dusethreads -DDEBUGGING'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='/opt/intel/oneapi/compiler/2024.1/bin/icx'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2 -g'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='/opt/intel/oneapi/compiler/2024.1/bin/icx'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/opt/intel/oneapi/compiler/2024.1/opt/compiler/lib /opt/intel/oneapi/compiler/2024.1/lib/clang/18/lib /usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
    libs=-lpthread -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
    libc=/lib/x86_64-linux-gnu/libc.so.6
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.36'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    DEBUGGING
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_TRACK_MEMPOOL
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
    USE_THREAD_SAFE_LOCALE
  Built under linux
  Compiled at May 13 2024 12:14:18
  %ENV:
    PERLBREW_BASHRC_VERSION="0.43"
    PERLBREW_HOME="/home/tony/.perlbrew"
    PERLBREW_MANPATH=""
    PERLBREW_PATH="/home/tony/perl5/perlbrew/bin"
    PERLBREW_ROOT="/home/tony/perl5/perlbrew"
    PERLBREW_VERSION="0.67"
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.39.11/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.39.11
    /usr/local/lib/perl5/5.39.11/x86_64-linux-thread-multi
    /usr/local/lib/perl5/5.39.11

tonycoz added a commit to tonycoz/perl5 that referenced this issue May 21, 2024
This failed some floating point tests, so the hints add fp-model=precise

Also capture the compiler version.

Fixes Perl#22209
book pushed a commit that referenced this issue May 23, 2024
This failed some floating point tests, so the hints add fp-model=precise

Also capture the compiler version.

Fixes #22209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant