Ticket #2817 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Experiment with Unity Builds

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Iteration 28
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description

As project is growing in size, build times getting too long. Affects productivity of developers.

Create an experimental unity build CMake configuration.

Change History

comment:1 Changed 9 years ago by Owen Arnold

(In [10780]) re #2817 Components for unity builds/cmake. Tested on Linux ubuntu 32 and 64 bit. Not yet windows compatible. Build time is half!, would be even quicker with MantidPlot sorted for UnityBuilds.

comment:2 Changed 9 years ago by Owen Arnold

  • Status changed from new to accepted

comment:3 Changed 9 years ago by Owen Arnold

  • Status changed from accepted to verify
  • Resolution set to fixed

Experimental unity build provided. Much faster build times. Further ticket required if this is to be scaled up to all platforms and all projects.

comment:4 Changed 9 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:5 Changed 9 years ago by Janik Zikovsky

  • Status changed from verifying to closed

This works! I think the improvement is largest for single- or few-core machines because the one big unity source file can only be compiled on one core at a time. On my machine, recompiling a small change took longer because it could not use all 8 cores.

comment:6 Changed 9 years ago by Owen Arnold

The macro enable_unity_builds i.e. enable_unity_build(MDEvents SRC_FILES SRC_UNITY_IGNORE_FILES 5) includes a final argument which specifies the maximum number of *.cpp files to have in each unity build file. In all cases this has been hardcoded to 1000. However, a machine dependent optimum could be found. This would be a trade-off between the use of multiple cores (lots of smaller files) and the bottleneck of high IO. This may go some way towards solving the issues identified by Janik.

comment:7 Changed 9 years ago by Janik Zikovsky

(In [11180]) Refs #2501, #2817: Unity build: number of files set to 10 instead of 1000.

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3664

Note: See TracTickets for help on using tickets.