stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

commit d12a0dbc36544c409242b90c660866ea41e06541
parent 5f254c8bd19793be864533ecdcbecb80a5fd7eaa
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 29 Nov 2021 14:21:53 +0100

Fix the rewind_progress_printing function

The printing was not rewind in MPI.

Diffstat:
Msrc/sdis.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sdis.c b/src/sdis.c @@ -42,7 +42,7 @@ static void rewind_progress_printing(struct sdis_device* dev) { size_t i; - if(dev->use_mpi || dev->mpi_nprocs == 1) return; + if(!dev->use_mpi || dev->mpi_nprocs == 1) return; FOR_EACH(i, 0, dev->mpi_nprocs-1) { log_info(dev, "\033[1A\r"); /* Move up */ } @@ -83,10 +83,10 @@ create_per_thread_rng ASSERT(dev && out_proxy && out_rngs); rngs = MEM_CALLOC(dev->allocator, dev->nthreads, sizeof(*rngs)); - if(!rngs) { + if(!rngs) { log_err(dev, "Could not allocate the list of per thread RNG.\n"); res = RES_MEM_ERR; - goto error; + goto error; } /* Create the RNG proxy */ @@ -146,7 +146,7 @@ create_per_thread_green_function greens = MEM_CALLOC(scn->dev->allocator, scn->dev->nthreads, sizeof(*greens)); if(!greens) { - log_err(scn->dev, + log_err(scn->dev, "Could not allocate the list of per thread green function.\n"); res = RES_MEM_ERR; goto error;