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

r.viewshed.exposure: Change nproc to 4 to speed up CI tests #1311

Merged
merged 5 commits into from
Feb 16, 2025

Conversation

echoix
Copy link
Member

@echoix echoix commented Feb 9, 2025

I measured about a 30sec time reduction by not using 10 cores, while the runners have 4 cores available. However, the r.univar stats didn't match exactly for the sum of test_lakes, at least not with a precision of 1E-5. So I measured multiple points, with different nproc values, to see what would be a good choice.

image

I chose midpoint of 1 and 10 core (on x64), they were the min and max before the 20 core that was further off. With a 4E-5 precision, all of the nproc values would be included.

Here is a bit of the commented code before I removed it through the last commit. Let me know if it should be kept, or having the info in the PR is enough.

            "sum": 31834.1480130134,  # midpoint of 1 and 10 core x64
            # "sum": 31834.1480232505,  # average 1, 2, 4 and 10 core
            # "sum": 31834.1480175955,  # average 1, 4 and 10 core
            # "sum": 31834.1480048643,  # average 4 and 10 core
            # "sum": 31834.1480430579,  # 1 core x64
            # "sum": 31834.1480402155,  # 2 core x64
            # "sum": 31834.1480267597,  # 4 core x64
            # "sum": 31834.1480075223,  # 8 core x64
            # "sum": 31834.1479829689,  # 10 core x64
            # "sum": 31834.1479833564,  # 12 core x64
            # "sum": 31834.1479394501,  # 20 core x64

…he results of 1 and 10 core (x64) for test_lakes.

The biggest precision gap (except for 20 core that is a bit off), is 3.00445E-05, so use a 4E-5 precision for that test instead of 1E-5

Results for test_lakes sum:
"sum": 31834.1480130134,  # midpoint of 1 and 10 core x64
"sum": 31834.1480232505,  # average 1, 2, 4 and 10 core
"sum": 31834.1480175955,  # average 1, 4 and 10 core
"sum": 31834.1480048643,  # average 4 and 10 core
"sum": 31834.1480430579,  # 1 core x64
"sum": 31834.1480402155,  # 2 core x64
"sum": 31834.1480267597,  # 4 core x64
"sum": 31834.1480075223,  # 8 core x64
"sum": 31834.1479829689,  # 10 core x64
"sum": 31834.1479833564,  # 12 core x64
"sum": 31834.1479394501,  # 20 core x64
@echoix echoix requested review from ninsbl and nilason February 9, 2025 21:24
@echoix echoix merged commit 3a11b74 into OSGeo:grass8 Feb 16, 2025
7 checks passed
@echoix echoix deleted the test-r.viewshed.exposure branch February 16, 2025 18:00
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.

1 participant