htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit 5ff5de7bf7fff376191e2cec70e5d2c077a656f0
parent 90e03015f2c2405d5af63b4cc6f68d7a61660ff3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue,  8 Nov 2022 12:12:00 +0100

Flush the output stream once written

Avoid missing results if, after the calculation is complete, the program
stops inappropriately

Diffstat:
Msrc/planeto/htrdr_planeto_draw_map.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/planeto/htrdr_planeto_draw_map.c b/src/planeto/htrdr_planeto_draw_map.c @@ -292,6 +292,8 @@ planeto_draw_map(struct htrdr_planeto* cmd) res = write_buffer(cmd, cmd->buf, &path_time_acc, cmd->output); if(res != RES_OK) goto error; + CHK(fflush(cmd->output) == 0); + /* Log time per realisation */ htrdr_accum_get_estimation(&path_time_acc, &path_time); htrdr_log(cmd->htrdr, "Time per radiative path (in µs): %g +/- %g\n",