Skip to content

Commit 6d199a7

Browse files
authored
add an abort to test_sdc if some integrations fail (#1177)
also abort for CPU or GPU, since the abort is outside of the GPU kernel
1 parent cb0a9fc commit 6d199a7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

unit_test/test_react/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,9 @@ void main_main ()
222222
aa_num_failed.copyToHost(&num_failed, 1);
223223
Gpu::synchronize();
224224

225-
#ifndef AMREX_USE_GPU
226225
if (num_failed > 0) {
227226
amrex::Abort("Integration failed");
228227
}
229-
#endif
230228

231229
// Call the timer again and compute the maximum difference between
232230
// the start time and stop time over all processors

unit_test/test_sdc/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ void main_main ()
211211
aa_num_failed.copyToHost(&num_failed, 1);
212212
Gpu::synchronize();
213213

214+
if (num_failed > 0) {
215+
amrex::Abort("Integration failed");
216+
}
217+
214218
// Call the timer again and compute the maximum difference between
215219
// the start time and stop time over all processors
216220
Real stop_time = ParallelDescriptor::second() - strt_time;

0 commit comments

Comments
 (0)