Skip to content

Fix CI job Generate coverage data / Generate coverage and push to Coveralls.io #611

Closed

Description

@PokhodenkoSA

I have made job "Generate coverage data / Generate coverage and push to Coveralls.io" as not required because it fails on master too.

Originally posted by @PokhodenkoSA in #599 (comment)

Activity

  1. PokhodenkoSA commented on Sep 30, 2021

    @PokhodenkoSA
    ContributorAuthor

    @diptorupd
    Could you please check why it fails?

  2. oleksandr-pavlyk commented on Sep 30, 2021

    @oleksandr-pavlyk
    Contributor

    @diptorupd was investigating this, I looked it up too.

    From the log, it appears somehow python setup.py develop --coverage silently crashes after coverage collection completes and never gets to build Python extension. Then it launches pytest, which fails at collection stage.

    This started with api 2021.4 appearance on APT servers.

  3. diptorupd commented on Sep 30, 2021

    @diptorupd
    Contributor

    @oleksandr-pavlyk most probably the issue is related to the bug/feature in 2021.4's dpcpp_cpp_rt's prefetch call. Once your workaround is merged, I expect tests and coverage to start working again.

  4. diptorupd commented on Sep 30, 2021

    @diptorupd
    Contributor

    The issue is some change in how llvm-profdata is generating the profile.

    Bare bones reproducer:

    // hello_world.cpp
    #include <iostream>
    
    void print_msg(const char* msg)
    {
        std::cout << msg << '\n';
    }
    
    int main ()
    {
        print_msg("hello World");
    }
    

    dpcpp -fprofile-instr-generate -fcoverage-mapping hello_world.cpp
    llvm-profdata merge -sparse default.profraw -o hello.profdata
    llvm-cov show ./a.out --instr-profile=hello.profdata

    I can reproduce the failure by doing just this much:

    error: /tmp/hello_world-48566a.cpp: No such file or directory
    warning: The file '/tmp/hello_world-48566a.cpp' isn't covered.
    
  5. diptorupd commented on Sep 30, 2021

    @diptorupd
    Contributor

    Or it might be that dpcpp's clang some how is embedding the mangled filename information into the profile.

  6. oleksandr-pavlyk commented on Oct 1, 2021

    @oleksandr-pavlyk
    Contributor

    Filed as XDEPS-2775.

    By the way, I tried reproducing it with OS compiler, but got:

    (build_sycl) [08:51:27 ansatnuc04 llvm]$ clang++ -fsycl -fprofile-instr-generate -fcoverage-mapping hello.cpp
    /usr/bin/ld: cannot find /localdisk/work/opavlyk/repos/llvm/build/lib/clang/14.0.0/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory
    clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
    

    I would love to know how to build the open source compiler with profile clang_rt.

  7. diptorupd commented on Oct 5, 2021

    @diptorupd
    Contributor

    Fixed by #614. We can revisit once 2022.1 (gold) is out or else keep using 2021.3 to generate coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions