stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit 483facf70a1c1ef132a063dbbcf37a30c4dd97e6
parent 6c6559c83459e1f2c488e1adae0230cc104b5bc0
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed, 16 Mar 2022 14:26:57 +0100

Fix merge of branch feature_prog_properties

Diffstat:
Msrc/stardis-app.c | 36++++++++++++++++++++++++++++++++++++
Msrc/stardis-app.h | 36------------------------------------
2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/stardis-app.c b/src/stardis-app.c @@ -759,8 +759,20 @@ void log_err_fn (const char* msg, void* ctx) { +#ifdef STARDIS_ENABLE_MPI + int initialized, rank = 0; +#endif + ASSERT(msg); (void)ctx; + +#ifdef STARDIS_ENABLE_MPI + CHK(MPI_Initialized(&initialized) == MPI_SUCCESS); + if(initialized) CHK(MPI_Comm_rank(MPI_COMM_WORLD, &rank) == MPI_SUCCESS); + /* Only master prints */ + if(rank != 0) return; +#endif + #ifdef OS_WINDOWS fprintf(stderr, "error: %s", msg); #else @@ -772,8 +784,20 @@ void log_warn_fn (const char* msg, void* ctx) { +#ifdef STARDIS_ENABLE_MPI + int initialized, rank = 0; +#endif + ASSERT(msg); (void)ctx; + +#ifdef STARDIS_ENABLE_MPI + CHK(MPI_Initialized(&initialized) == MPI_SUCCESS); + if(initialized) CHK(MPI_Comm_rank(MPI_COMM_WORLD, &rank) == MPI_SUCCESS); + /* Only master prints */ + if(rank != 0) return; +#endif + #ifdef OS_WINDOWS fprintf(stderr, "warning: %s", msg); #else @@ -785,8 +809,20 @@ void log_prt_fn (const char* msg, void* ctx) { +#ifdef stardis_enable_mpi + int initialized, rank = 0; +#endif + ASSERT(msg); (void)ctx; + +#ifdef stardis_enable_mpi + chk(mpi_initialized(&initialized) == mpi_success); + if(initialized) chk(mpi_comm_rank(mpi_comm_world, &rank) == mpi_success); + /* only master prints */ + if(rank != 0) return; +#endif + #ifdef OS_WINDOWS fprintf(stderr, "message: %s", msg); #else diff --git a/src/stardis-app.h b/src/stardis-app.h @@ -160,48 +160,12 @@ release_camera(struct camera* cam); void log_err_fn(const char* msg, void* ctx); -#ifdef STARDIS_ENABLE_MPI - int initialized, rank = 0; -#endif - - -#ifdef STARDIS_ENABLE_MPI - CHK(MPI_Initialized(&initialized) == MPI_SUCCESS); - if(initialized) CHK(MPI_Comm_rank(MPI_COMM_WORLD, &rank) == MPI_SUCCESS); - /* Only master prints */ - if(rank != 0) return; -#endif - void log_warn_fn(const char* msg, void* ctx); -#ifdef STARDIS_ENABLE_MPI - int initialized, rank = 0; -#endif - - -#ifdef STARDIS_ENABLE_MPI - CHK(MPI_Initialized(&initialized) == MPI_SUCCESS); - if(initialized) CHK(MPI_Comm_rank(MPI_COMM_WORLD, &rank) == MPI_SUCCESS); - /* Only master prints */ - if(rank != 0) return; -#endif - void log_prt_fn(const char* msg, void* ctx); -#ifdef STARDIS_ENABLE_MPI - int initialized, rank = 0; -#endif - - -#ifdef STARDIS_ENABLE_MPI - CHK(MPI_Initialized(&initialized) == MPI_SUCCESS); - if(initialized) CHK(MPI_Comm_rank(MPI_COMM_WORLD, &rank) == MPI_SUCCESS); - /* Only master prints */ - if(rank != 0) return; -#endif - struct counts { unsigned smed_count, fmed_count, tbound_count, hbound_count,