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

Storing/using last_started and last_ended #1043

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

jmlarson1
Copy link
Member

No description provided.

@jmlarson1 jmlarson1 requested review from jlnav and shuds13 July 20, 2023 18:50
Base automatically changed from study/performance to develop August 2, 2023 15:42
@jlnav
Copy link
Member

jlnav commented Aug 2, 2023

Any anecdotal speed-comparisons between this approach and develop?

@shuds13
Copy link
Member

shuds13 commented Aug 10, 2023

mpi4py with 4 workers, wallclock time:

I compared original code with sliding window and with a one-liner that simply returns if canceled is False for all H, and with not calling kill_canceled_sims at all (time if we were to default to False).

time mpirun -np 5 python test_1d_sampling.py

Code 1e4 sims 1e5 sims
Original code 6.330s 1m41.355s
Sliding window 6.286s 1m13.934s
With oneliner 5.830s 1m23.056s
Dont call func 5.808s 1m7.471s

1,000 sims - Sliding window benefits little. 10,000 sims, sliding window benefits significantly!

Local comms. With no sleep added - times show large overheads accumulating. If adding a small sleep, times are:

Code 1e4 sims 1e5 sims
Original code 0m5.874s 1m47.824s
Sliding window 0m6.217s 1m29.937s
With oneliner 0m5.886s 1m28.981s
Dont call func 0m5.798s 1m17.970s

The one-liner benefits more, when no cancels. If we keep kill canceled sims as the default - maybe we should combine one-liner with sliding window, to make quicker when no cancels. If we make kill canceled False, by default, the one-liner wont help.

@shuds13
Copy link
Member

shuds13 commented Aug 18, 2023

I'm going to test a bit more, to see if it's worth combining the one-line check with the sliding window.

shuds13
shuds13 previously approved these changes Aug 18, 2023
@shuds13 shuds13 dismissed their stale review August 18, 2023 22:06

changes required

@shuds13 shuds13 merged commit 6fd760c into develop Aug 18, 2023
13 checks passed
@shuds13 shuds13 mentioned this pull request Aug 31, 2023
34 tasks
@jmlarson1 jmlarson1 deleted the performance/sliding_window branch September 21, 2023 13:52
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.

3 participants