Skip to content

Commit

Permalink
Merge #1402
Browse files Browse the repository at this point in the history
1402: Error on NaNs in driver solution r=charleskawczynski a=charleskawczynski

This PR adds a check for NaNs in the hybrid examples driver.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski authored Aug 2, 2023
2 parents af22da3 + 9a74b96 commit ed22b28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/hybrid/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ end
@info "on a vertical $z_stretch_string grid"

walltime = @elapsed sol = OrdinaryDiffEq.solve!(integrator)
any(isnan, sol.u[end]) && error("NaNs found in result.")

if is_distributed # replace sol.u on the root processor with the global sol.u
if ClimaComms.iamroot(comms_ctx)
Expand Down

0 comments on commit ed22b28

Please sign in to comment.