Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
7568 Discussions

Parallel build with prof-gen=srcpos option not working?

missing__zlw
Beginner
192 Views

I am working on code coverage for a large project. We build our project which contains hundreds of cpp/h files spread in different directories. 

I build our project using latest icpc with options -prof-gen=srcpos before I run profmerge and codecov. I build with parallel mode : make -j

I found the sizes of generated spi file varies a lot and the final code coverage report is incorrect. I suspect the spi file is generated incorrectly.

Is it because of the parallel build? Do I have to do sequential build with prof-gen=srcpos option?

Thank.

0 Kudos
3 Replies
Kittur_G_Intel
Employee
192 Views

Hi @zlw,
Yes, code coverage should work fine with parallel builds. I am not able to reproduce the issue. Can you please attach a small reproducer so I can reproduce the issue? Only I can is when I can file the issue with the developers. Appreciate your help.
Regards,
Kittur 

missing__zlw
Beginner
192 Views

Thank you. It is a large project, so it is hard to reproduce. 

I tried to run sequential build and my spi file is about 600M size. But if I do parallel build, the generated spi file is about 400M. So I guess something is not right. Also, as there is only one spi file generated, I am guessing writing in parallel to a single file can be a problem, isn't it?

Kittur_G_Intel
Employee
192 Views

Hi,
Yes, if the spi files generated in size are different then it appears there is an issue. I confirmed with the developers that writing in parallel shouldn't be a problem and should work. Unfortunately, unless I have a reproducer I can't file an issue. If you're able to reduce to a smaller reproducer that'll be great. Or you can go to https://premier.intel.com and file the issue there and attach the large test case (content is secure) and we can delete the test case as soon as the issue is reproduced. Does  that work?

Thanks,
Kittur

Reply