7 Replies Latest reply: May 8, 2012 7:40 AM by Jon Jarboe RSS

Handling parallel builds

Asya Kamsky Coverity Ninja
Currently Being Moderated

Originally published on 2010-04-05 11:37

 

If the native build is parallel on linux then wrapping it in cov-build will seamlessly parallelize the Coverity emit processes to the same degree as the native build does.  Same goes for other Unix systems (Solaris, etc).

 

If the native build is parallel on windows then wrapping it in cov-build will serialize it.  If you would like to parallelize cov-emitting of a windows build, you can use record and replay and after the record of native build is complete use the -j option to cov-build --replay to parallelize the replaying of compilations.

  • Re: Handling parallel builds
    alokumar Contributor
    Currently Being Moderated

    Originally published on 2011-09-26 01:29

     

    Hi Asya,


    I am trying record , replay command with cov-build but getting errors.


    First I executed follwoing command to record:


    cov-build --dir=c:\CovLogsCS6 --record-only perl c:\Development\Scripts\Settings\Build.pl -nobuildacceptance -nobuildcorba -nopost -noproduction -build -target=release -arch=x32


    It executed sucessfully, but when I am running replay command I am getting following errors:

    C:\Development\Scripts\Settings>cov-build --dir=c:\CovLogsCS6 --replay -j 4


    Cannot find row with ID -1 in CovEmitInvocation
    [ERROR] Replay failed. Please look at c:\CovLogsCS6\replay-log.txt for more details.

    Can you please suggets how to resolve them.


    Thanks and Regards,
    Alok

    • Re: Handling parallel builds
      Coverity Ninja
      Currently Being Moderated

      Originally published on 2011-09-26 08:21

       

      So: what exactly are the errors that you see when you look at 'replay-log.txt'?

       

      You may want to consider opening a Support incident for this problem - that's probably a better path to getting you an answer than this venue.

  • Re: Handling parallel builds
    cpverne Explorer
    Currently Being Moderated

    Originally published on 2011-11-07 12:38

     

    As of 5.4, the cov-format-errors command doesn't support the output directories generated by cov-analyze -j4.  It doesn't have an --extra-output option like cov-commit-defects does.  Has this been fixed in 5.5.1?

    • Re: Handling parallel builds
      Coverity Ninja
      Currently Being Moderated

      Originally published on 2011-11-07 19:09

       

      First off, you really shouldn't be using 'cov-format-errors' for anything other than diagnosis and debugging.  'cov-format-errors' has no knowledge of the history of a defect, so you can't mark things as intentional -- they'll always show up, regardless.

       

      Secondly, the parallel analysis in 5.5 is a ground-up rewrite that uses a much better parallelizing algorithm than in any previous release of Coverity.  As a side-effect, if you run parallel analysis with '-j4' using CSA 5.5, all of the results will be in a single output directory, and 'cov-format-errors' will have no problems reading all of your defects.

      • Re: Handling parallel builds
        cpverne Explorer
        Currently Being Moderated

        Originally published on 2011-11-08 07:16

         

        Ok.  How can I enable our developers to compile their code in their workspace and see if they have introduced errors without commiting their build to a stream in the database?  Our software can be compiled in lots of different ways, so providing each developer a stream for each different build is not feasable.

  • Re: Handling parallel builds
    Explorer
    Currently Being Moderated

    Is there any reason not to do the cov-build record/replay on windows build to parallelize it?  Just trying to understand any differences or consequences between doing that versus just a normal cov-build.  I assume the parallelized record/replay is more resource intensive but any other differences?

    • Re: Handling parallel builds
      Jon Jarboe Moderator
      Currently Being Moderated

      If you're using version 5.5 or newer of Coverity, you may not need to use record/replay to get a parallel build on Windows.  We added a new option to cov-build, --instrument, in these releases to avoid serialization of the build.  With this option, cov-build on Windows is generally comparable to cov-build on Unix-like platforms.

       

      If you want a detailed understanding of record/replay consequences, it's probably easier to have a discussion with our Support team.