Repository navigation
Set both cubed sphere test models from the same initial fields - #6148
Merged
Merged
Conversation
The cubed sphere simulation test compares a model using a split-explicit free surface with extended halos against one without, and expects the same result. It gave both models the same noisy initial conditions by calling `Random.seed!(1234)` before setting each of them with functions calling `rand()`. That relies on how `set!` evaluates functions: in which task, and in which order. It only holds when `set!` evaluates in the calling task in a fixed order, and breaks as soon as the function is evaluated in spawned tasks, whose random number streams also depend on the tasks spawned before (e.g. by GPU synchronization). Draw the noisy initial conditions once into fields and set both models from them, so that they start from the same state by construction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EtLmZUPY4g9hi8aJsM4Wrs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6148 +/- ##
===========================================
+ Coverage 32.42% 74.42% +41.99%
===========================================
Files 439 439
Lines 27305 27538 +233
===========================================
+ Hits 8855 20494 +11639
+ Misses 18450 7044 -11406
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
navidcy
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a test failure observed in #5799: the test is implicitly relying on the tests running with one thread, which (1) isn't necessarily true in general, and (2) is always false even in CI with KernelAbstractions.jl v0.10.