star-phor

Radiative transfer solver for photoreactors.
git clone https://www.edstar.cnrs.fr/git/star-phor.git
Log | Files | Refs | README | LICENSE

commit fc4dfff17129da72a2d3408571d6d18418c74141
parent 934e3783f95d2e5b0f6aa5a3bb05f645f4404554
Author: Eduardo Fontana Lazzari <edufonlaz@gmail.com>
Date:   Wed, 25 Feb 2026 19:16:54 +0100

Print the number of failures (if any)

The star-phor output file contains only the average and standard
deviation for each estimated observable, which is not enough information
for users who want to perform further statistical analyses with their
results. The missing piece of information is the effective number of
realizations. Up to this point, this could not be determined, since
realizations may fail silently.

This commit addresses this issue by printing the number of failed
samples (if greater than zero) at the end of the realization loop as a
warning.

Diffstat:
Msrc/sphor_compute_mvrea.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/sphor_compute_mvrea.c b/src/sphor_compute_mvrea.c @@ -1063,6 +1063,12 @@ sphor_compute_MVREA /* Aggregate accums from the different threads in the main accumulator */ sum_accum_lists(&accums_threads, &accums); + if (0 < nfailures) { + WARN(sphor, + "%lu effective realizations and %lu failures out of %lu samples.\n", + samples-nfailures, nfailures, samples); + } + res = MVREA_write_outputs(sphor, &accums, nfailures); if (res != RES_OK) { goto error; }