Skip to content

Commit 28c735f

Browse files
committed
Fix MPI test: use OR logic for absolute/relative tolerance check
1 parent 2302782 commit 28c735f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/test_mpi.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ function compare_results(ref_result, test_result, test_nprocs; verbose=true)
291291
end
292292
end
293293

294-
# Pass/fail
295-
passed = (max_abs_diff < MPI_TOL_ABS && max_rel_diff < MPI_TOL_REL)
294+
# Pass/fail (OR logic: pass if either absolute OR relative error is acceptable)
295+
passed = (max_abs_diff < MPI_TOL_ABS || max_rel_diff < MPI_TOL_REL)
296296

297297
if verbose
298298
println("\n" * "="^70)

0 commit comments

Comments
 (0)