aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gpu_sim_check.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/gpu_sim_check.c b/tests/gpu_sim_check.c
index 28e85bcc..3bcaa561 100644
--- a/tests/gpu_sim_check.c
+++ b/tests/gpu_sim_check.c
@@ -141,7 +141,20 @@ int main(int argc, char *argv[])
free_detector_geometry(det);
free(beam);
- if ( perc > 1.0 ) return 1;
+ if ( perc > 1.0 ) {
+
+ STATUS("Test failed! I'm writing cpu-sim.h5 and gpu-sim.h5"
+ " for you to inspect.\n");
+
+ hdf5_write("cpu-sim.h5", cpu_image.data, cpu_image.width,
+ cpu_image.height, H5T_NATIVE_FLOAT);
+
+ hdf5_write("gpu-sim.h5", gpu_image.data, gpu_image.width,
+ gpu_image.height, H5T_NATIVE_FLOAT);
+
+ return 1;
+
+ }
return 0;
}