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

if using MSVC, then add /MP flag to speed up builds #2111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imrichardcole
Copy link

From a basic test using GitHub actions, I compared the Windows build with all configurations workflows.

From here I can see an average of around 2h15m - https://github.com/lballabio/QuantLib/actions/workflows/msvc-all-configs.yml

And in my test it was just over 1h.

Copy link

boring-cyborg bot commented Nov 10, 2024

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

@CLAassistant
Copy link

CLAassistant commented Nov 10, 2024

CLA assistant check
All committers have signed the CLA.

@lballabio
Copy link
Owner

Hi, thanks but I'm a bit confused -- the msvc-all-configs.yml workflow you linked doesn't use cmake...

@imrichardcole
Copy link
Author

Hi - oh that's strange indeed. Maybe I just got lucky with my runs, but saw it was much faster.

Looking at the yml file:

msbuild ./QuantLib.sln /verbosity:normal /property:Configuration="${{ matrix.configuration }}" /property:Platform=${{ matrix.platform }}

How is this solution file generated in these pipelines?

@lballabio
Copy link
Owner

It's not generated, it's maintained.

@imrichardcole
Copy link
Author

Noted. So it's interesting, I've run my PR three times now - resulting in 57mins, 1h2mins and 59mins. I had incorrectly put this down to my change, but I guess it must be unrelated.

Do you have a workflow that does use cmake on windows/msvc?

@lballabio
Copy link
Owner

I think the 2-hours time you're seeing is because the workflow is run weekly at night together with other workflows, and the jobs spend time being queued which is also counted in the overall workflow time. If you click on "show all jobs" in your run at https://github.com/imrichardcole/QuantLib/actions/runs/11765594786 and our latest run at https://github.com/lballabio/QuantLib/actions/runs/11760510340, the times for the single jobs are comparable (you win some, you lose some, but they're always in the same ballpark.)

For a workflow that uses cmake, see https://github.com/lballabio/QuantLib/actions/workflows/cmake.yml; however, on the one hand, it uses sccache which makes it harder to compare times, and on the other hand, it uses ninja as makefile generator which already enables parallel builds.

@coveralls
Copy link

Coverage Status

coverage: 72.193% (-0.6%) from 72.803%
when pulling 42b550f on imrichardcole:task/use-msvc-mp-flag-for-parallel-compilation
into 585bb09 on lballabio:master.

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

Successfully merging this pull request may close these issues.

4 participants