htrdr

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

commit 1874c2200c4dae26934ae642fcc7a562eb3c5f1b
parent aaa6bb63cebc2ee2cc08374d8233680e77ff831b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue,  7 Apr 2020 17:03:13 +0200

Fix a segfault on process with rank != 0

Diffstat:
Msrc/htrdr.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/htrdr.c b/src/htrdr.c @@ -502,7 +502,10 @@ htrdr_init if(!args->output) { htrdr->output = stdout; output_name = "<stdout>"; - } else if(htrdr->mpi_rank == 0) { + } else if(htrdr->mpi_rank != 0) { + htrdr->output = NULL; + output_name = "<null>"; + } else { res = open_output_stream (htrdr, args->output, 0/*read*/, args->force_overwriting, &htrdr->output); if(res != RES_OK) goto error;